sig
module type Node =
sig
type t
type graph
type label
type edge
val create : Graphlib.Std.Node.label -> Graphlib.Std.Node.t
val label : Graphlib.Std.Node.t -> Graphlib.Std.Node.label
val mem : Graphlib.Std.Node.t -> Graphlib.Std.Node.graph -> bool
val succs :
Graphlib.Std.Node.t ->
Graphlib.Std.Node.graph -> Graphlib.Std.Node.t Regular.Std.seq
val preds :
Graphlib.Std.Node.t ->
Graphlib.Std.Node.graph -> Graphlib.Std.Node.t Regular.Std.seq
val inputs :
Graphlib.Std.Node.t ->
Graphlib.Std.Node.graph -> Graphlib.Std.Node.edge Regular.Std.seq
val outputs :
Graphlib.Std.Node.t ->
Graphlib.Std.Node.graph -> Graphlib.Std.Node.edge Regular.Std.seq
val degree :
?dir:[ `In | `Out ] ->
Graphlib.Std.Node.t -> Graphlib.Std.Node.graph -> int
val insert :
Graphlib.Std.Node.t ->
Graphlib.Std.Node.graph -> Graphlib.Std.Node.graph
val update :
Graphlib.Std.Node.t ->
Graphlib.Std.Node.label ->
Graphlib.Std.Node.graph -> Graphlib.Std.Node.graph
val remove :
Graphlib.Std.Node.t ->
Graphlib.Std.Node.graph -> Graphlib.Std.Node.graph
val has_edge :
Graphlib.Std.Node.t ->
Graphlib.Std.Node.t -> Graphlib.Std.Node.graph -> bool
val edge :
Graphlib.Std.Node.t ->
Graphlib.Std.Node.t ->
Graphlib.Std.Node.graph -> Graphlib.Std.Node.edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, comparator_witness) Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t = (Key.t, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list -> [ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change : 'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check -> 'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a) Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = Map.Key.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(Elt.t, comparator_witness) Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t -> t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t = (Elt.t, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t -> (Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t -> t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs -> t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr -> t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map : ('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness) Core_kernel.Core_set_intf.Map.t ->
t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
val t_of_sexp : (Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t : ('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list -> [ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b, (key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) -> 'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t -> init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti : 'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add : 'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t -> key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change : 'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri : 'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t -> f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add : 'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key -> if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) -> unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace : 'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace : 'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli : 'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all : 'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar : 'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check -> 'b t Core_kernel.Validate.check
val incr : ?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr : ?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = Hash_set.elt
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : ?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue : 'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module type Edge =
sig
type t
type node
type graph
type label
val create :
Graphlib.Std.Edge.node ->
Graphlib.Std.Edge.node ->
Graphlib.Std.Edge.label -> Graphlib.Std.Edge.t
val label : Graphlib.Std.Edge.t -> Graphlib.Std.Edge.label
val src : Graphlib.Std.Edge.t -> Graphlib.Std.Edge.node
val dst : Graphlib.Std.Edge.t -> Graphlib.Std.Edge.node
val mem : Graphlib.Std.Edge.t -> Graphlib.Std.Edge.graph -> bool
val insert :
Graphlib.Std.Edge.t ->
Graphlib.Std.Edge.graph -> Graphlib.Std.Edge.graph
val update :
Graphlib.Std.Edge.t ->
Graphlib.Std.Edge.label ->
Graphlib.Std.Edge.graph -> Graphlib.Std.Edge.graph
val remove :
Graphlib.Std.Edge.t ->
Graphlib.Std.Edge.graph -> Graphlib.Std.Edge.graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, comparator_witness) Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t = (Key.t, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list -> [ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change : 'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check -> 'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a) Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = Map.Key.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(Elt.t, comparator_witness) Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t -> t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t = (Elt.t, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t -> (Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t -> t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs -> t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr -> t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map : ('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness) Core_kernel.Core_set_intf.Map.t ->
t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
val t_of_sexp : (Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t : ('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list -> [ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b, (key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) -> 'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t -> init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti : 'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add : 'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t -> key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change : 'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri : 'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t -> f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add : 'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key -> if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) -> unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace : 'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace : 'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli : 'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all : 'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar : 'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check -> 'b t Core_kernel.Validate.check
val incr : ?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr : ?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = Hash_set.elt
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : ?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue : 'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end
module type Graph =
sig
type t
type node
type edge
module Node :
sig
type t = node
type graph = t
type label
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t Regular.Std.seq
val preds : t -> graph -> t Regular.Std.seq
val inputs : t -> graph -> edge Regular.Std.seq
val outputs : t -> graph -> edge Regular.Std.seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = node
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(node, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : node -> 'a -> 'a t
val of_alist :
(node * 'a) list ->
[ `Duplicate_key of node | `Ok of 'a t ]
val of_alist_or_error :
(node * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (node * 'a) list -> 'a t
val of_alist_multi : (node * 'a) list -> 'a list t
val of_alist_fold :
(node * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(node * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(node * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (node * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:node -> data:'a -> 'a t
val add_multi :
'a list t -> key:node -> data:'a -> 'a list t
val remove_multi : 'a list t -> node -> 'a list t
val change :
'a t -> node -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> node -> f:('a option -> 'a) -> 'a t
val find : 'a t -> node -> 'a option
val find_exn : 'a t -> node -> 'a
val remove : 'a t -> node -> 'a t
val mem : 'a t -> node -> bool
val iter : 'a t -> f:(key:node -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:node -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(node -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:node ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:node -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:node ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(node -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:node -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:node -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> node list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (node * 'a) list
val validate :
name:(node -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:node ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(node, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (node * 'a) option
val min_elt_exn : 'a t -> node * 'a
val max_elt : 'a t -> (node * 'a) option
val max_elt_exn : 'a t -> node * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:node -> data:'a -> bool) -> int
val split :
'a t -> node -> 'a t * (node * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:node ->
max:node ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:node -> max:node -> (node * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> node -> (node * 'a) option
val nth : 'a t -> int -> (node * 'a) option
val rank : 'a t -> node -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:node ->
?keys_less_or_equal_to:node ->
'a t -> (node * 'a) Core_kernel.Sequence.t
val obs :
node Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
node Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(node, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : node -> 'a -> 'a t
val of_alist :
(node * 'a) list -> [ `Duplicate_key of node | `Ok of 'a t ]
val of_alist_or_error :
(node * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (node * 'a) list -> 'a t
val of_alist_multi : (node * 'a) list -> 'a list t
val of_alist_fold :
(node * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(node * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(node * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (node * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:node -> data:'a -> 'a t
val add_multi : 'a list t -> key:node -> data:'a -> 'a list t
val remove_multi : 'a list t -> node -> 'a list t
val change : 'a t -> node -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> node -> f:('a option -> 'a) -> 'a t
val find : 'a t -> node -> 'a option
val find_exn : 'a t -> node -> 'a
val remove : 'a t -> node -> 'a t
val mem : 'a t -> node -> bool
val iter : 'a t -> f:(key:node -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:node -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(node -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:node ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:node -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:node ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filteri : 'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(node -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:node -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:node -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> node list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (node * 'a) list
val validate :
name:(node -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:node ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(node, 'a) Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (node * 'a) option
val min_elt_exn : 'a t -> node * 'a
val max_elt : 'a t -> (node * 'a) option
val max_elt_exn : 'a t -> node * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:node -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:node -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:node -> data:'a -> bool) -> int
val split : 'a t -> node -> 'a t * (node * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:node ->
max:node ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:node -> max:node -> (node * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> node -> (node * 'a) option
val nth : 'a t -> int -> (node * 'a) option
val rank : 'a t -> node -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:node ->
?keys_less_or_equal_to:node ->
'a t -> (node * 'a) Core_kernel.Sequence.t
val obs :
node Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
node Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = node
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(node, comparator_witness) Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(node -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> node -> 'accum) -> 'accum
val exists : t -> f:(node -> bool) -> bool
val for_all : t -> f:(node -> bool) -> bool
val count : t -> f:(node -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(node -> 'sum) -> 'sum
val find : t -> f:(node -> bool) -> node option
val find_map : t -> f:(node -> 'a option) -> 'a option
val to_list : t -> node list
val to_array : t -> node array
val invariants : t -> bool
val mem : t -> node -> bool
val add : t -> node -> t
val remove : t -> node -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(node, node) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> node -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(node -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of node * node
| `Left of node
| `Right of node ] -> unit) ->
unit
val filter : t -> f:(node -> bool) -> t
val partition_tf : t -> f:(node -> bool) -> t * t
val elements : t -> node list
val min_elt : t -> node option
val min_elt_exn : t -> node
val max_elt : t -> node option
val max_elt_exn : t -> node
val choose : t -> node option
val choose_exn : t -> node
val split : t -> node -> t * node option * t
val group_by : t -> equiv:(node -> node -> bool) -> t list
val find_exn : t -> f:(node -> bool) -> node
val find_index : t -> int -> node option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t -> node Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t ->
t ->
node
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(node -> 'data) ->
(node, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
node Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
node Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : node -> t
val union_list : t list -> t
val of_list : node list -> t
val of_array : node array -> t
val of_sorted_array :
node array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : node array -> t
val stable_dedup_list : node list -> node list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> node) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> node option) -> t
val of_tree : t -> t
val of_map_keys :
(node, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t = (node, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(node -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> node -> 'accum) -> 'accum
val exists : t -> f:(node -> bool) -> bool
val for_all : t -> f:(node -> bool) -> bool
val count : t -> f:(node -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(node -> 'sum) -> 'sum
val find : t -> f:(node -> bool) -> node option
val find_map : t -> f:(node -> 'a option) -> 'a option
val to_list : t -> node list
val to_array : t -> node array
val invariants : t -> bool
val mem : t -> node -> bool
val add : t -> node -> t
val remove : t -> node -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t -> (node, node) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> node -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(node -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of node * node | `Left of node | `Right of node ] ->
unit) ->
unit
val filter : t -> f:(node -> bool) -> t
val partition_tf : t -> f:(node -> bool) -> t * t
val elements : t -> node list
val min_elt : t -> node option
val min_elt_exn : t -> node
val max_elt : t -> node option
val max_elt_exn : t -> node
val choose : t -> node option
val choose_exn : t -> node
val split : t -> node -> t * node option * t
val group_by : t -> equiv:(node -> node -> bool) -> t list
val find_exn : t -> f:(node -> bool) -> node
val find_index : t -> int -> node option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node -> t -> node Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t ->
t ->
node Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(node -> 'data) ->
(node, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
node Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
node Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : node -> t
val union_list : t list -> t
val of_list : node list -> t
val of_array : node array -> t
val of_sorted_array : node array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : node array -> t
val stable_dedup_list : node list -> node list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> node) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> node option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(node, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list -> [ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b, (key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t -> init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti : 'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add : 'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t -> key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change : 'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri : 'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add : 'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key -> if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace : 'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace : 'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli : 'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all : 'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar : 'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = node
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : ?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> node -> bool
val lookup : 'a t -> node -> 'a option
val lookup_exn : 'a t -> node -> 'a
val enqueue :
'a t -> node -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> node -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (node * 'a) option
val keys : 'a t -> node list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (node * 'a) option
val dequeue_with_key_exn : 'a t -> node * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> node -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> node -> unit
val replace : 'a t -> node -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> node -> 'a -> unit
val iteri : 'a t -> f:(key:node -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:node -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = Node.t
type graph = Node.graph
type label
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = edge
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(edge, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : edge -> 'a -> 'a t
val of_alist :
(edge * 'a) list ->
[ `Duplicate_key of edge | `Ok of 'a t ]
val of_alist_or_error :
(edge * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (edge * 'a) list -> 'a t
val of_alist_multi : (edge * 'a) list -> 'a list t
val of_alist_fold :
(edge * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(edge * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(edge * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (edge * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:edge -> data:'a -> 'a t
val add_multi :
'a list t -> key:edge -> data:'a -> 'a list t
val remove_multi : 'a list t -> edge -> 'a list t
val change :
'a t -> edge -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> edge -> f:('a option -> 'a) -> 'a t
val find : 'a t -> edge -> 'a option
val find_exn : 'a t -> edge -> 'a
val remove : 'a t -> edge -> 'a t
val mem : 'a t -> edge -> bool
val iter : 'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(edge -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:edge -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(edge -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:edge -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:edge -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> edge list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (edge * 'a) list
val validate :
name:(edge -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:edge ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(edge, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (edge * 'a) option
val min_elt_exn : 'a t -> edge * 'a
val max_elt : 'a t -> (edge * 'a) option
val max_elt_exn : 'a t -> edge * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:edge -> data:'a -> bool) -> int
val split :
'a t -> edge -> 'a t * (edge * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:edge ->
max:edge ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:edge -> max:edge -> (edge * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> edge -> (edge * 'a) option
val nth : 'a t -> int -> (edge * 'a) option
val rank : 'a t -> edge -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:edge ->
?keys_less_or_equal_to:edge ->
'a t -> (edge * 'a) Core_kernel.Sequence.t
val obs :
edge Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
edge Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(edge, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : edge -> 'a -> 'a t
val of_alist :
(edge * 'a) list -> [ `Duplicate_key of edge | `Ok of 'a t ]
val of_alist_or_error :
(edge * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (edge * 'a) list -> 'a t
val of_alist_multi : (edge * 'a) list -> 'a list t
val of_alist_fold :
(edge * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(edge * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(edge * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (edge * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:edge -> data:'a -> 'a t
val add_multi : 'a list t -> key:edge -> data:'a -> 'a list t
val remove_multi : 'a list t -> edge -> 'a list t
val change : 'a t -> edge -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> edge -> f:('a option -> 'a) -> 'a t
val find : 'a t -> edge -> 'a option
val find_exn : 'a t -> edge -> 'a
val remove : 'a t -> edge -> 'a t
val mem : 'a t -> edge -> bool
val iter : 'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(edge -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:edge -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filteri : 'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(edge -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:edge -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:edge -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> edge list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (edge * 'a) list
val validate :
name:(edge -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:edge ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(edge, 'a) Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (edge * 'a) option
val min_elt_exn : 'a t -> edge * 'a
val max_elt : 'a t -> (edge * 'a) option
val max_elt_exn : 'a t -> edge * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:edge -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:edge -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:edge -> data:'a -> bool) -> int
val split : 'a t -> edge -> 'a t * (edge * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:edge ->
max:edge ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:edge -> max:edge -> (edge * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> edge -> (edge * 'a) option
val nth : 'a t -> int -> (edge * 'a) option
val rank : 'a t -> edge -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:edge ->
?keys_less_or_equal_to:edge ->
'a t -> (edge * 'a) Core_kernel.Sequence.t
val obs :
edge Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
edge Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = edge
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(edge, comparator_witness) Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(edge -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> edge -> 'accum) -> 'accum
val exists : t -> f:(edge -> bool) -> bool
val for_all : t -> f:(edge -> bool) -> bool
val count : t -> f:(edge -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(edge -> 'sum) -> 'sum
val find : t -> f:(edge -> bool) -> edge option
val find_map : t -> f:(edge -> 'a option) -> 'a option
val to_list : t -> edge list
val to_array : t -> edge array
val invariants : t -> bool
val mem : t -> edge -> bool
val add : t -> edge -> t
val remove : t -> edge -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(edge, edge) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> edge -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(edge -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of edge * edge
| `Left of edge
| `Right of edge ] -> unit) ->
unit
val filter : t -> f:(edge -> bool) -> t
val partition_tf : t -> f:(edge -> bool) -> t * t
val elements : t -> edge list
val min_elt : t -> edge option
val min_elt_exn : t -> edge
val max_elt : t -> edge option
val max_elt_exn : t -> edge
val choose : t -> edge option
val choose_exn : t -> edge
val split : t -> edge -> t * edge option * t
val group_by : t -> equiv:(edge -> edge -> bool) -> t list
val find_exn : t -> f:(edge -> bool) -> edge
val find_index : t -> int -> edge option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t -> edge Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t ->
t ->
edge
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(edge -> 'data) ->
(edge, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
edge Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
edge Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : edge -> t
val union_list : t list -> t
val of_list : edge list -> t
val of_array : edge array -> t
val of_sorted_array :
edge array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : edge array -> t
val stable_dedup_list : edge list -> edge list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> edge) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> edge option) -> t
val of_tree : t -> t
val of_map_keys :
(edge, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t = (edge, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(edge -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> edge -> 'accum) -> 'accum
val exists : t -> f:(edge -> bool) -> bool
val for_all : t -> f:(edge -> bool) -> bool
val count : t -> f:(edge -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(edge -> 'sum) -> 'sum
val find : t -> f:(edge -> bool) -> edge option
val find_map : t -> f:(edge -> 'a option) -> 'a option
val to_list : t -> edge list
val to_array : t -> edge array
val invariants : t -> bool
val mem : t -> edge -> bool
val add : t -> edge -> t
val remove : t -> edge -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t -> (edge, edge) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> edge -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(edge -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of edge * edge | `Left of edge | `Right of edge ] ->
unit) ->
unit
val filter : t -> f:(edge -> bool) -> t
val partition_tf : t -> f:(edge -> bool) -> t * t
val elements : t -> edge list
val min_elt : t -> edge option
val min_elt_exn : t -> edge
val max_elt : t -> edge option
val max_elt_exn : t -> edge
val choose : t -> edge option
val choose_exn : t -> edge
val split : t -> edge -> t * edge option * t
val group_by : t -> equiv:(edge -> edge -> bool) -> t list
val find_exn : t -> f:(edge -> bool) -> edge
val find_index : t -> int -> edge option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge -> t -> edge Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t ->
t ->
edge Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(edge -> 'data) ->
(edge, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
edge Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
edge Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : edge -> t
val union_list : t list -> t
val of_list : edge list -> t
val of_array : edge array -> t
val of_sorted_array : edge array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : edge array -> t
val stable_dedup_list : edge list -> edge list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> edge) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> edge option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(edge, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Node.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list -> [ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b, (key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t -> init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti : 'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add : 'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t -> key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change : 'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri : 'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add : 'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key -> if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace : 'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace : 'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli : 'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all : 'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar : 'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Node.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = edge
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : ?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> edge -> bool
val lookup : 'a t -> edge -> 'a option
val lookup_exn : 'a t -> edge -> 'a
val enqueue :
'a t -> edge -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> edge -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (edge * 'a) option
val keys : 'a t -> edge list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (edge * 'a) option
val dequeue_with_key_exn : 'a t -> edge * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> edge -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> edge -> unit
val replace : 'a t -> edge -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> edge -> 'a -> unit
val iteri : 'a t -> f:(key:edge -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:edge -> data:'a -> 'b) -> 'b
end
end
val empty : Graphlib.Std.Graph.t
val nodes :
Graphlib.Std.Graph.t -> Graphlib.Std.Graph.node Regular.Std.seq
val edges :
Graphlib.Std.Graph.t -> Graphlib.Std.Graph.edge Regular.Std.seq
val is_directed : bool
val number_of_edges : Graphlib.Std.Graph.t -> int
val number_of_nodes : Graphlib.Std.Graph.t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = Edge.graph
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, comparator_witness) Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t = (Key.t, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list -> [ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change : 'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check -> 'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a) Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = Edge.graph
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(Elt.t, comparator_witness) Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t -> t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t = (Elt.t, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t -> (Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t -> t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs -> t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr -> t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map : ('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness) Core_kernel.Core_set_intf.Map.t ->
t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Edge.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp : (Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t : ('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list -> [ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b, (key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) -> 'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t -> init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti : 'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add : 'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t -> key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change : 'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri : 'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t -> f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add : 'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key -> if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) -> unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace : 'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace : 'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli : 'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all : 'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar : 'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check -> 'b t Core_kernel.Validate.check
val incr : ?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr : ?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Edge.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = Hash_set.elt
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : ?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue : 'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : Core_kernel.Std.out_channel -> t -> unit
val pp_seq : Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
type ('c, 'n, 'e) graph =
(module Graphlib.Std.Graph with type edge = 'e and type node = 'n and type t = 'c)
type edge_kind = [ `Back | `Cross | `Forward | `Tree ]
type 'a tree
type 'a frontier
type 'a partition
type 'a group
type 'a path
type equiv
module Tree :
sig
type 'a t = 'a Graphlib.Std.tree
val children : 'a Graphlib.Std.Tree.t -> 'a -> 'a Regular.Std.seq
val parent : 'a Graphlib.Std.Tree.t -> 'a -> 'a option
val ancestors : 'a Graphlib.Std.Tree.t -> 'a -> 'a Regular.Std.seq
val descendants : 'a Graphlib.Std.Tree.t -> 'a -> 'a Regular.Std.seq
val is_child_of : 'a Graphlib.Std.Tree.t -> parent:'a -> 'a -> bool
val is_ancestor_of : 'a Graphlib.Std.Tree.t -> child:'a -> 'a -> bool
val is_descendant_of :
'a Graphlib.Std.Tree.t -> parent:'a -> 'a -> bool
val to_sequence : 'a Graphlib.Std.Tree.t -> 'a Regular.Std.seq
val pp :
'a Regular.Std.printer -> 'a Graphlib.Std.Tree.t Regular.Std.printer
end
module Frontier :
sig
type 'a t = 'a Graphlib.Std.frontier
val enum : 'a Graphlib.Std.Frontier.t -> 'a -> 'a Regular.Std.seq
val mem : 'a Graphlib.Std.Frontier.t -> 'a -> 'a -> bool
val to_sequence : 'a Graphlib.Std.Frontier.t -> 'a Regular.Std.seq
val pp :
'a Regular.Std.printer ->
'a Graphlib.Std.Frontier.t Regular.Std.printer
end
module Path :
sig
type 'e t = 'e Graphlib.Std.path
val start : 'e Graphlib.Std.Path.t -> 'e
val finish : 'e Graphlib.Std.Path.t -> 'e
val edges : 'e Graphlib.Std.Path.t -> 'e Regular.Std.seq
val edges_rev : 'e Graphlib.Std.Path.t -> 'e Regular.Std.seq
val weight : 'e Graphlib.Std.Path.t -> int
val length : 'e Graphlib.Std.Path.t -> int
val pp :
'a Regular.Std.printer -> 'a Graphlib.Std.Path.t Regular.Std.printer
end
module Partition :
sig
type 'a t = 'a Graphlib.Std.partition
val groups :
'a Graphlib.Std.Partition.t -> 'a Graphlib.Std.group Regular.Std.seq
val group :
'a Graphlib.Std.Partition.t -> 'a -> 'a Graphlib.Std.group option
val equiv : 'a Graphlib.Std.Partition.t -> 'a -> 'a -> bool
val number_of_groups : 'a Graphlib.Std.Partition.t -> int
val of_equiv :
'a Graphlib.Std.Partition.t ->
Graphlib.Std.equiv -> 'a Graphlib.Std.group option
val pp :
'a Regular.Std.printer ->
'a Graphlib.Std.Partition.t Regular.Std.printer
end
module Group :
sig
type 'a t = 'a Graphlib.Std.group
val enum : 'a Graphlib.Std.group -> 'a Regular.Std.seq
val mem : 'a Graphlib.Std.group -> 'a -> bool
val top : 'a Graphlib.Std.group -> 'a
val to_equiv : 'a Graphlib.Std.group -> Graphlib.Std.equiv
val pp :
'a Regular.Std.printer -> 'a Graphlib.Std.Group.t Regular.Std.printer
end
module Equiv :
sig
type t
val to_int : Graphlib.Std.Equiv.t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_t : t Core_kernel.Std.Bin_prot.Type_class.t
val bin_read_t : t Core_kernel.Std.Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Core_kernel.Std.Bin_prot.Read.reader
val bin_reader_t : t Core_kernel.Std.Bin_prot.Type_class.reader
val bin_size_t : t Core_kernel.Std.Bin_prot.Size.sizer
val bin_write_t : t Core_kernel.Std.Bin_prot.Write.writer
val bin_writer_t : t Core_kernel.Std.Bin_prot.Type_class.writer
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : Core_kernel.Std.out_channel -> t -> unit
val pp_seq : Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val validate_lbound :
min:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, comparator_witness) Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t = (Key.t, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list -> [ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change : 'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check -> 'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a) Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi : 'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Set :
sig
module Elt :
sig
type t = Map.Key.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(Elt.t, comparator_witness) Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t -> t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t = (Elt.t, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t -> (Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t -> t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs -> t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr -> t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map : ('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness) Core_kernel.Core_set_intf.Map.t ->
t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
val hash : t -> int
val hashable : t Core_kernel.Std.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Core_kernel.Std.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
val t_of_sexp : (Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t : ('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list -> [ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b, (key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) -> 'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t -> init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti : 'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add : 'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t -> key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change : 'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri : 'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t -> f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add : 'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key -> if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) -> unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace : 'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace : 'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli : 'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all : 'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar : 'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check -> 'b t Core_kernel.Validate.check
val incr : ?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr : ?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Core_kernel.Hash_set.t
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
end
module Hash_queue :
sig
module Key :
sig
type t = Hash_set.elt
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create : ?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue : 'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
type info = string * [ `Ver of string ] * string option
val version : string
val size_in_bytes : ?ver:string -> ?fmt:string -> t -> int
val of_bytes : ?ver:string -> ?fmt:string -> Regular.Std.bytes -> t
val to_bytes : ?ver:string -> ?fmt:string -> t -> Regular.Std.bytes
val blit_to_bytes :
?ver:string -> ?fmt:string -> Regular.Std.bytes -> t -> int -> unit
val of_bigstring :
?ver:string -> ?fmt:string -> Core_kernel.Std.bigstring -> t
val to_bigstring :
?ver:string -> ?fmt:string -> t -> Core_kernel.Std.bigstring
val blit_to_bigstring :
?ver:string ->
?fmt:string -> Core_kernel.Std.bigstring -> t -> int -> unit
module Io :
sig
val read : ?ver:string -> ?fmt:string -> string -> t
val load :
?ver:string -> ?fmt:string -> Core_kernel.Std.in_channel -> t
val load_all :
?ver:string ->
?fmt:string -> ?rev:bool -> Core_kernel.Std.in_channel -> t list
val scan :
?ver:string ->
?fmt:string -> Core_kernel.Std.in_channel -> unit -> t option
val write : ?ver:string -> ?fmt:string -> string -> t -> unit
val save :
?ver:string ->
?fmt:string -> Core_kernel.Std.out_channel -> t -> unit
val save_all :
?ver:string ->
?fmt:string -> Core_kernel.Std.out_channel -> t list -> unit
val dump :
?ver:string ->
?fmt:string ->
Core_kernel.Std.out_channel -> (unit -> t option) -> unit
val show : ?ver:string -> ?fmt:string -> t -> unit
val print :
?ver:string -> ?fmt:string -> Format.formatter -> t -> unit
end
module Cache :
sig
val load : Regular.Std.digest -> t option
val save : Regular.Std.digest -> t -> unit
end
val add_reader :
?desc:string -> ver:string -> string -> t Regular.Std.reader -> unit
val add_writer :
?desc:string -> ver:string -> string -> t Regular.Std.writer -> unit
val available_readers : unit -> info list
val default_reader : unit -> info
val set_default_reader : ?ver:string -> string -> unit
val with_reader : ?ver:string -> string -> (unit -> 'a) -> 'a
val available_writers : unit -> info list
val default_writer : unit -> info
val set_default_writer : ?ver:string -> string -> unit
val with_writer : ?ver:string -> string -> (unit -> 'a) -> 'a
val default_printer : unit -> info option
val set_default_printer : ?ver:string -> string -> unit
val with_printer : ?ver:string -> string -> (unit -> 'a) -> 'a
val find_reader : ?ver:string -> string -> t Regular.Std.reader option
val find_writer : ?ver:string -> string -> t Regular.Std.writer option
end
module type Predicate =
sig
type edge
type node
val edge : Graphlib.Std.Predicate.edge -> bool
val node : Graphlib.Std.Predicate.node -> bool
end
module type Isomorphism =
sig
type s
type t
val forward : Graphlib.Std.Isomorphism.s -> Graphlib.Std.Isomorphism.t
val backward : Graphlib.Std.Isomorphism.t -> Graphlib.Std.Isomorphism.s
end
class type ['n, 'e, 's] dfs_visitor =
object
method enter_edge : Graphlib.Std.edge_kind -> 'e -> 's -> 's
method enter_node : int -> 'n -> 's -> 's
method leave_edge : Graphlib.Std.edge_kind -> 'e -> 's -> 's
method leave_node : int -> 'n -> 's -> 's
method start_tree : 'n -> 's -> 's
end
type node_attr = Graph.Graphviz.DotAttributes.vertex
type edge_attr = Graph.Graphviz.DotAttributes.edge
type graph_attr = Graph.Graphviz.DotAttributes.graph
type ('n, 'a) labeled = { node : 'n; node_label : 'a; }
module Graphlib :
sig
module type Graph = Graph
val create :
(module Graphlib.Std.Graphlib.Graph with type t = 'c and type Edge.label = 'b and type Node.label = 'a) ->
?nodes:'a list -> ?edges:('a * 'a * 'b) list -> unit -> 'c
val union :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
'c -> 'c -> 'c
val inter :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
'c -> 'c -> 'c
val to_dot :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?graph_attrs:('c -> Graphlib.Std.graph_attr list) ->
?node_attrs:('n -> Graphlib.Std.node_attr list) ->
?edge_attrs:('e -> Graphlib.Std.edge_attr list) ->
?string_of_node:('n -> string) ->
?string_of_edge:('e -> string) ->
?channel:Core_kernel.Std.out_channel ->
?formatter:Format.formatter -> ?filename:string -> 'c -> unit
val depth_first_search :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool ->
?start:'n ->
?start_tree:('n -> 's -> 's) ->
?enter_node:(int -> 'n -> 's -> 's) ->
?leave_node:(int -> 'n -> 's -> 's) ->
?enter_edge:(Graphlib.Std.edge_kind -> 'e -> 's -> 's) ->
?leave_edge:(Graphlib.Std.edge_kind -> 'e -> 's -> 's) ->
'c -> init:'s -> 's
val depth_first_visit :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool ->
?start:'n ->
'c -> init:'s -> ('n, 'e, 's) Graphlib.Std.dfs_visitor -> 's
class ['n, 'e, 's] dfs_identity_visitor : ['n, 'e, 's] dfs_visitor
val reverse_postorder_traverse :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool -> ?start:'n -> 'c -> 'n Regular.Std.seq
val postorder_traverse :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool -> ?start:'n -> 'c -> 'n Regular.Std.seq
val dominators :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool -> 'c -> 'n -> 'n Graphlib.Std.tree
val dom_frontier :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool -> 'c -> 'n Graphlib.Std.tree -> 'n Graphlib.Std.frontier
val strong_components :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
'c -> 'n Graphlib.Std.partition
val shortest_path :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?weight:('e -> int) ->
?rev:bool -> 'c -> 'n -> 'n -> 'e Graphlib.Std.path option
val is_reachable :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool -> 'c -> 'n -> 'n -> bool
val fold_reachable :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?rev:bool -> init:'a -> f:('a -> 'n -> 'a) -> 'c -> 'n -> 'a
val compare :
(module Graphlib.Std.Graphlib.Graph with type node = 'n and type t = 'a) ->
(module Graphlib.Std.Graphlib.Graph with type node = 'n and type t = 'b) ->
'a -> 'b -> int
val filtered :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c) ->
?skip_node:('n -> bool) ->
?skip_edge:('e -> bool) ->
unit ->
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c)
val view :
(module Graphlib.Std.Graphlib.Graph with type edge = 'e and type node = 'n and type t = 'c and type Edge.label = 'b and type Node.label = 'a) ->
node:('n -> 'f) * ('f -> 'n) ->
edge:('e -> 'd) * ('d -> 'e) ->
node_label:('a -> 'p) * ('p -> 'a) ->
edge_label:('b -> 'r) * ('r -> 'b) ->
(module Graphlib.Std.Graphlib.Graph with type edge = 'd and type node = 'f and type t = 'c and type Edge.label = 'r and type Node.label = 'p)
module To_ocamlgraph :
functor (G : Graph) ->
sig
type t = G.t
module V :
sig
type t = G.node
val compare : t -> t -> int
val hash : t -> int
val equal : t -> t -> bool
type label = G.Node.label
val create : label -> t
val label : t -> label
end
type vertex = V.t
module E :
sig
type t = G.edge
val compare : t -> t -> int
type vertex = V.t
val src : t -> vertex
val dst : t -> vertex
type label = G.Edge.label
val create : vertex -> label -> vertex -> t
val label : t -> label
end
type edge = E.t
val is_directed : bool
val is_empty : t -> bool
val nb_vertex : t -> int
val nb_edges : t -> int
val out_degree : t -> vertex -> int
val in_degree : t -> vertex -> int
val mem_vertex : t -> vertex -> bool
val mem_edge : t -> vertex -> vertex -> bool
val mem_edge_e : t -> edge -> bool
val find_edge : t -> vertex -> vertex -> edge
val find_all_edges : t -> vertex -> vertex -> edge list
val succ : t -> vertex -> vertex list
val pred : t -> vertex -> vertex list
val succ_e : t -> vertex -> edge list
val pred_e : t -> vertex -> edge list
val iter_vertex : (vertex -> unit) -> t -> unit
val fold_vertex : (vertex -> 'a -> 'a) -> t -> 'a -> 'a
val iter_edges : (vertex -> vertex -> unit) -> t -> unit
val fold_edges : (vertex -> vertex -> 'a -> 'a) -> t -> 'a -> 'a
val iter_edges_e : (edge -> unit) -> t -> unit
val fold_edges_e : (edge -> 'a -> 'a) -> t -> 'a -> 'a
val map_vertex : (vertex -> vertex) -> t -> t
val iter_succ : (vertex -> unit) -> t -> vertex -> unit
val iter_pred : (vertex -> unit) -> t -> vertex -> unit
val fold_succ : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val fold_pred : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val iter_succ_e : (edge -> unit) -> t -> vertex -> unit
val fold_succ_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val iter_pred_e : (edge -> unit) -> t -> vertex -> unit
val fold_pred_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val empty : t
val add_vertex : t -> vertex -> t
val remove_vertex : t -> vertex -> t
val add_edge : t -> vertex -> vertex -> t
val add_edge_e : t -> edge -> t
val remove_edge : t -> vertex -> vertex -> t
val remove_edge_e : t -> edge -> t
end
module Of_ocamlgraph :
functor (G : Graph.Sig.P) ->
sig
type t = G.t
type node = G.V.t
type edge = G.E.t
module Node :
sig
type t = node
type graph = G.t
type label = G.V.label
type edge = G.E.t
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t Regular.Std.seq
val preds : t -> graph -> t Regular.Std.seq
val inputs : t -> graph -> edge Regular.Std.seq
val outputs : t -> graph -> edge Regular.Std.seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = node
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(node, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : node -> 'a -> 'a t
val of_alist :
(node * 'a) list ->
[ `Duplicate_key of node | `Ok of 'a t ]
val of_alist_or_error :
(node * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (node * 'a) list -> 'a t
val of_alist_multi : (node * 'a) list -> 'a list t
val of_alist_fold :
(node * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(node * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(node * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(node * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:node -> data:'a -> 'a t
val add_multi :
'a list t -> key:node -> data:'a -> 'a list t
val remove_multi : 'a list t -> node -> 'a list t
val change :
'a t -> node -> f:('a option -> 'a option) -> 'a t
val update :
'a t -> node -> f:('a option -> 'a) -> 'a t
val find : 'a t -> node -> 'a option
val find_exn : 'a t -> node -> 'a
val remove : 'a t -> node -> 'a t
val mem : 'a t -> node -> bool
val iter :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(node -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:node ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:node -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:node ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(node -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:node -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:node ->
data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partitioni_tf :
'a t ->
f:(key:node -> data:'a -> bool) -> 'a t * 'a t
val partition_tf :
'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> node list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (node * 'a) list
val validate :
name:(node -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:node ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(node, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (node * 'a) option
val min_elt_exn : 'a t -> node * 'a
val max_elt : 'a t -> (node * 'a) option
val max_elt_exn : 'a t -> node * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:node -> data:'a -> bool) -> int
val split :
'a t -> node -> 'a t * (node * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:node ->
max:node ->
init:'b ->
f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:node -> max:node -> (node * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> node -> (node * 'a) option
val nth : 'a t -> int -> (node * 'a) option
val rank : 'a t -> node -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:node ->
?keys_less_or_equal_to:node ->
'a t -> (node * 'a) Core_kernel.Sequence.t
val obs :
node Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
node Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(node, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : node -> 'a -> 'a t
val of_alist :
(node * 'a) list ->
[ `Duplicate_key of node | `Ok of 'a t ]
val of_alist_or_error :
(node * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (node * 'a) list -> 'a t
val of_alist_multi : (node * 'a) list -> 'a list t
val of_alist_fold :
(node * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(node * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(node * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (node * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:node -> data:'a -> 'a t
val add_multi :
'a list t -> key:node -> data:'a -> 'a list t
val remove_multi : 'a list t -> node -> 'a list t
val change :
'a t -> node -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> node -> f:('a option -> 'a) -> 'a t
val find : 'a t -> node -> 'a option
val find_exn : 'a t -> node -> 'a
val remove : 'a t -> node -> 'a t
val mem : 'a t -> node -> bool
val iter :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(node -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:node ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:node -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:node ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(node -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:node -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:node -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> node list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (node * 'a) list
val validate :
name:(node -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:node ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(node, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (node * 'a) option
val min_elt_exn : 'a t -> node * 'a
val max_elt : 'a t -> (node * 'a) option
val max_elt_exn : 'a t -> node * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:node -> data:'a -> bool) -> int
val split :
'a t -> node -> 'a t * (node * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:node ->
max:node ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:node -> max:node -> (node * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> node -> (node * 'a) option
val nth : 'a t -> int -> (node * 'a) option
val rank : 'a t -> node -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:node ->
?keys_less_or_equal_to:node ->
'a t -> (node * 'a) Core_kernel.Sequence.t
val obs :
node Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
node Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = node
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(node, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(node -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> node -> 'accum) -> 'accum
val exists : t -> f:(node -> bool) -> bool
val for_all : t -> f:(node -> bool) -> bool
val count : t -> f:(node -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(node -> 'sum) -> 'sum
val find : t -> f:(node -> bool) -> node option
val find_map :
t -> f:(node -> 'a option) -> 'a option
val to_list : t -> node list
val to_array : t -> node array
val invariants : t -> bool
val mem : t -> node -> bool
val add : t -> node -> t
val remove : t -> node -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(node, node) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> node -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(node -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of node * node
| `Left of node
| `Right of node ] -> unit) ->
unit
val filter : t -> f:(node -> bool) -> t
val partition_tf : t -> f:(node -> bool) -> t * t
val elements : t -> node list
val min_elt : t -> node option
val min_elt_exn : t -> node
val max_elt : t -> node option
val max_elt_exn : t -> node
val choose : t -> node option
val choose_exn : t -> node
val split : t -> node -> t * node option * t
val group_by :
t -> equiv:(node -> node -> bool) -> t list
val find_exn : t -> f:(node -> bool) -> node
val find_index : t -> int -> node option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t -> node Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t ->
t ->
node
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(node -> 'data) ->
(node, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
node Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
node Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : node -> t
val union_list : t list -> t
val of_list : node list -> t
val of_array : node array -> t
val of_sorted_array :
node array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : node array -> t
val stable_dedup_list : node list -> node list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> node) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> node option) -> t
val of_tree : t -> t
val of_map_keys :
(node, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t =
(node, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(node -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> node -> 'accum) -> 'accum
val exists : t -> f:(node -> bool) -> bool
val for_all : t -> f:(node -> bool) -> bool
val count : t -> f:(node -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(node -> 'sum) -> 'sum
val find : t -> f:(node -> bool) -> node option
val find_map : t -> f:(node -> 'a option) -> 'a option
val to_list : t -> node list
val to_array : t -> node array
val invariants : t -> bool
val mem : t -> node -> bool
val add : t -> node -> t
val remove : t -> node -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(node, node) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> node -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(node -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of node * node
| `Left of node
| `Right of node ] -> unit) ->
unit
val filter : t -> f:(node -> bool) -> t
val partition_tf : t -> f:(node -> bool) -> t * t
val elements : t -> node list
val min_elt : t -> node option
val min_elt_exn : t -> node
val max_elt : t -> node option
val max_elt_exn : t -> node
val choose : t -> node option
val choose_exn : t -> node
val split : t -> node -> t * node option * t
val group_by :
t -> equiv:(node -> node -> bool) -> t list
val find_exn : t -> f:(node -> bool) -> node
val find_index : t -> int -> node option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t -> node Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t ->
t ->
node
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(node -> 'data) ->
(node, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
node Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
node Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : node -> t
val union_list : t list -> t
val of_list : node list -> t
val of_array : node array -> t
val of_sorted_array :
node array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : node array -> t
val stable_dedup_list : node list -> node list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> node) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> node option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(node, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b,
(key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t ->
init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri :
'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti :
'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add :
'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t ->
key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add :
'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace :
'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all :
'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar :
'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Equiv.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = node
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> node -> bool
val lookup : 'a t -> node -> 'a option
val lookup_exn : 'a t -> node -> 'a
val enqueue :
'a t -> node -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> node -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (node * 'a) option
val keys : 'a t -> node list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (node * 'a) option
val dequeue_with_key_exn : 'a t -> node * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> node -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> node -> unit
val replace :
'a t -> node -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> node -> 'a -> unit
val iteri :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:node -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = Node.t
type graph = Node.graph
type label = G.E.label
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = edge
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(edge, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : edge -> 'a -> 'a t
val of_alist :
(edge * 'a) list ->
[ `Duplicate_key of edge | `Ok of 'a t ]
val of_alist_or_error :
(edge * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (edge * 'a) list -> 'a t
val of_alist_multi : (edge * 'a) list -> 'a list t
val of_alist_fold :
(edge * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(edge * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(edge * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(edge * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:edge -> data:'a -> 'a t
val add_multi :
'a list t -> key:edge -> data:'a -> 'a list t
val remove_multi : 'a list t -> edge -> 'a list t
val change :
'a t -> edge -> f:('a option -> 'a option) -> 'a t
val update :
'a t -> edge -> f:('a option -> 'a) -> 'a t
val find : 'a t -> edge -> 'a option
val find_exn : 'a t -> edge -> 'a
val remove : 'a t -> edge -> 'a t
val mem : 'a t -> edge -> bool
val iter :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(edge -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:edge ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:edge -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:edge ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(edge -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:edge -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:edge ->
data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partitioni_tf :
'a t ->
f:(key:edge -> data:'a -> bool) -> 'a t * 'a t
val partition_tf :
'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> edge list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (edge * 'a) list
val validate :
name:(edge -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:edge ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(edge, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (edge * 'a) option
val min_elt_exn : 'a t -> edge * 'a
val max_elt : 'a t -> (edge * 'a) option
val max_elt_exn : 'a t -> edge * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:edge -> data:'a -> bool) -> int
val split :
'a t -> edge -> 'a t * (edge * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:edge ->
max:edge ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:edge -> max:edge -> (edge * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> edge -> (edge * 'a) option
val nth : 'a t -> int -> (edge * 'a) option
val rank : 'a t -> edge -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:edge ->
?keys_less_or_equal_to:edge ->
'a t -> (edge * 'a) Core_kernel.Sequence.t
val obs :
edge Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
edge Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(edge, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : edge -> 'a -> 'a t
val of_alist :
(edge * 'a) list ->
[ `Duplicate_key of edge | `Ok of 'a t ]
val of_alist_or_error :
(edge * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (edge * 'a) list -> 'a t
val of_alist_multi : (edge * 'a) list -> 'a list t
val of_alist_fold :
(edge * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(edge * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(edge * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (edge * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:edge -> data:'a -> 'a t
val add_multi :
'a list t -> key:edge -> data:'a -> 'a list t
val remove_multi : 'a list t -> edge -> 'a list t
val change :
'a t -> edge -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> edge -> f:('a option -> 'a) -> 'a t
val find : 'a t -> edge -> 'a option
val find_exn : 'a t -> edge -> 'a
val remove : 'a t -> edge -> 'a t
val mem : 'a t -> edge -> bool
val iter :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(edge -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:edge -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(edge -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:edge -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:edge -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> edge list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (edge * 'a) list
val validate :
name:(edge -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:edge ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(edge, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (edge * 'a) option
val min_elt_exn : 'a t -> edge * 'a
val max_elt : 'a t -> (edge * 'a) option
val max_elt_exn : 'a t -> edge * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:edge -> data:'a -> bool) -> int
val split :
'a t -> edge -> 'a t * (edge * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:edge ->
max:edge ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:edge -> max:edge -> (edge * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> edge -> (edge * 'a) option
val nth : 'a t -> int -> (edge * 'a) option
val rank : 'a t -> edge -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:edge ->
?keys_less_or_equal_to:edge ->
'a t -> (edge * 'a) Core_kernel.Sequence.t
val obs :
edge Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
edge Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = edge
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(edge, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(edge -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> edge -> 'accum) -> 'accum
val exists : t -> f:(edge -> bool) -> bool
val for_all : t -> f:(edge -> bool) -> bool
val count : t -> f:(edge -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(edge -> 'sum) -> 'sum
val find : t -> f:(edge -> bool) -> edge option
val find_map :
t -> f:(edge -> 'a option) -> 'a option
val to_list : t -> edge list
val to_array : t -> edge array
val invariants : t -> bool
val mem : t -> edge -> bool
val add : t -> edge -> t
val remove : t -> edge -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(edge, edge) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> edge -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(edge -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of edge * edge
| `Left of edge
| `Right of edge ] -> unit) ->
unit
val filter : t -> f:(edge -> bool) -> t
val partition_tf : t -> f:(edge -> bool) -> t * t
val elements : t -> edge list
val min_elt : t -> edge option
val min_elt_exn : t -> edge
val max_elt : t -> edge option
val max_elt_exn : t -> edge
val choose : t -> edge option
val choose_exn : t -> edge
val split : t -> edge -> t * edge option * t
val group_by :
t -> equiv:(edge -> edge -> bool) -> t list
val find_exn : t -> f:(edge -> bool) -> edge
val find_index : t -> int -> edge option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t -> edge Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t ->
t ->
edge
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(edge -> 'data) ->
(edge, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
edge Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
edge Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : edge -> t
val union_list : t list -> t
val of_list : edge list -> t
val of_array : edge array -> t
val of_sorted_array :
edge array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : edge array -> t
val stable_dedup_list : edge list -> edge list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> edge) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> edge option) -> t
val of_tree : t -> t
val of_map_keys :
(edge, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t =
(edge, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(edge -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> edge -> 'accum) -> 'accum
val exists : t -> f:(edge -> bool) -> bool
val for_all : t -> f:(edge -> bool) -> bool
val count : t -> f:(edge -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(edge -> 'sum) -> 'sum
val find : t -> f:(edge -> bool) -> edge option
val find_map : t -> f:(edge -> 'a option) -> 'a option
val to_list : t -> edge list
val to_array : t -> edge array
val invariants : t -> bool
val mem : t -> edge -> bool
val add : t -> edge -> t
val remove : t -> edge -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(edge, edge) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> edge -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(edge -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of edge * edge
| `Left of edge
| `Right of edge ] -> unit) ->
unit
val filter : t -> f:(edge -> bool) -> t
val partition_tf : t -> f:(edge -> bool) -> t * t
val elements : t -> edge list
val min_elt : t -> edge option
val min_elt_exn : t -> edge
val max_elt : t -> edge option
val max_elt_exn : t -> edge
val choose : t -> edge option
val choose_exn : t -> edge
val split : t -> edge -> t * edge option * t
val group_by :
t -> equiv:(edge -> edge -> bool) -> t list
val find_exn : t -> f:(edge -> bool) -> edge
val find_index : t -> int -> edge option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t -> edge Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t ->
t ->
edge
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(edge -> 'data) ->
(edge, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
edge Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
edge Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : edge -> t
val union_list : t list -> t
val of_list : edge list -> t
val of_array : edge array -> t
val of_sorted_array :
edge array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : edge array -> t
val stable_dedup_list : edge list -> edge list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> edge) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> edge option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(edge, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Node.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b,
(key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t ->
init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri :
'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti :
'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add :
'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t ->
key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add :
'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace :
'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all :
'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar :
'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Node.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = edge
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> edge -> bool
val lookup : 'a t -> edge -> 'a option
val lookup_exn : 'a t -> edge -> 'a
val enqueue :
'a t -> edge -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> edge -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (edge * 'a) option
val keys : 'a t -> edge list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (edge * 'a) option
val dequeue_with_key_exn : 'a t -> edge * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> edge -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> edge -> unit
val replace :
'a t -> edge -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> edge -> 'a -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:edge -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node Regular.Std.seq
val edges : t -> edge Regular.Std.seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = Edge.graph
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split :
'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(Key.t, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split :
'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = Edge.graph
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(Elt.t, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t = (Elt.t, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Edge.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list -> [ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b, (key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t -> init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti : 'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add : 'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t -> key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri : 'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add : 'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace : 'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all : 'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar : 'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Edge.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = Hash_set.elt
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : Core_kernel.Std.out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Filtered :
functor
(G : Graph) (P : sig
type edge = G.edge
type node = G.node
val edge : edge -> bool
val node : node -> bool
end) ->
sig
type t = G.t
type node = P.node
type edge = P.edge
module Node :
sig
type t = node
type graph = G.t
type label = G.Node.label
type edge = P.edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t Regular.Std.seq
val preds : t -> graph -> t Regular.Std.seq
val inputs : t -> graph -> edge Regular.Std.seq
val outputs : t -> graph -> edge Regular.Std.seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness = G.Node.comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = node
type comparator_witness = G.Node.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(node, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : node -> 'a -> 'a t
val of_alist :
(node * 'a) list ->
[ `Duplicate_key of node | `Ok of 'a t ]
val of_alist_or_error :
(node * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (node * 'a) list -> 'a t
val of_alist_multi : (node * 'a) list -> 'a list t
val of_alist_fold :
(node * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(node * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(node * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(node * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:node -> data:'a -> 'a t
val add_multi :
'a list t -> key:node -> data:'a -> 'a list t
val remove_multi : 'a list t -> node -> 'a list t
val change :
'a t -> node -> f:('a option -> 'a option) -> 'a t
val update :
'a t -> node -> f:('a option -> 'a) -> 'a t
val find : 'a t -> node -> 'a option
val find_exn : 'a t -> node -> 'a
val remove : 'a t -> node -> 'a t
val mem : 'a t -> node -> bool
val iter :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(node -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:node ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:node -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:node ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(node -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:node -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:node ->
data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partitioni_tf :
'a t ->
f:(key:node -> data:'a -> bool) -> 'a t * 'a t
val partition_tf :
'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> node list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (node * 'a) list
val validate :
name:(node -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:node ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(node, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (node * 'a) option
val min_elt_exn : 'a t -> node * 'a
val max_elt : 'a t -> (node * 'a) option
val max_elt_exn : 'a t -> node * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:node -> data:'a -> bool) -> int
val split :
'a t -> node -> 'a t * (node * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:node ->
max:node ->
init:'b ->
f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:node -> max:node -> (node * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> node -> (node * 'a) option
val nth : 'a t -> int -> (node * 'a) option
val rank : 'a t -> node -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:node ->
?keys_less_or_equal_to:node ->
'a t -> (node * 'a) Core_kernel.Sequence.t
val obs :
node Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
node Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(node, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : node -> 'a -> 'a t
val of_alist :
(node * 'a) list ->
[ `Duplicate_key of node | `Ok of 'a t ]
val of_alist_or_error :
(node * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (node * 'a) list -> 'a t
val of_alist_multi : (node * 'a) list -> 'a list t
val of_alist_fold :
(node * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(node * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(node * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (node * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:node -> data:'a -> 'a t
val add_multi :
'a list t -> key:node -> data:'a -> 'a list t
val remove_multi : 'a list t -> node -> 'a list t
val change :
'a t -> node -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> node -> f:('a option -> 'a) -> 'a t
val find : 'a t -> node -> 'a option
val find_exn : 'a t -> node -> 'a
val remove : 'a t -> node -> 'a t
val mem : 'a t -> node -> bool
val iter :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(node -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:node ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:node -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:node ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(node -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:node -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:node -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> node list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (node * 'a) list
val validate :
name:(node -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:node ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(node, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (node * 'a) option
val min_elt_exn : 'a t -> node * 'a
val max_elt : 'a t -> (node * 'a) option
val max_elt_exn : 'a t -> node * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:node -> data:'a -> bool) -> int
val split :
'a t -> node -> 'a t * (node * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:node ->
max:node ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:node -> max:node -> (node * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> node -> (node * 'a) option
val nth : 'a t -> int -> (node * 'a) option
val rank : 'a t -> node -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:node ->
?keys_less_or_equal_to:node ->
'a t -> (node * 'a) Core_kernel.Sequence.t
val obs :
node Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
node Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = node
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(node, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(node -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> node -> 'accum) -> 'accum
val exists : t -> f:(node -> bool) -> bool
val for_all : t -> f:(node -> bool) -> bool
val count : t -> f:(node -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(node -> 'sum) -> 'sum
val find : t -> f:(node -> bool) -> node option
val find_map :
t -> f:(node -> 'a option) -> 'a option
val to_list : t -> node list
val to_array : t -> node array
val invariants : t -> bool
val mem : t -> node -> bool
val add : t -> node -> t
val remove : t -> node -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(node, node) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> node -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(node -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of node * node
| `Left of node
| `Right of node ] -> unit) ->
unit
val filter : t -> f:(node -> bool) -> t
val partition_tf : t -> f:(node -> bool) -> t * t
val elements : t -> node list
val min_elt : t -> node option
val min_elt_exn : t -> node
val max_elt : t -> node option
val max_elt_exn : t -> node
val choose : t -> node option
val choose_exn : t -> node
val split : t -> node -> t * node option * t
val group_by :
t -> equiv:(node -> node -> bool) -> t list
val find_exn : t -> f:(node -> bool) -> node
val find_index : t -> int -> node option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t -> node Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t ->
t ->
node
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(node -> 'data) ->
(node, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
node Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
node Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : node -> t
val union_list : t list -> t
val of_list : node list -> t
val of_array : node array -> t
val of_sorted_array :
node array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : node array -> t
val stable_dedup_list : node list -> node list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> node) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> node option) -> t
val of_tree : t -> t
val of_map_keys :
(node, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t =
(node, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(node -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> node -> 'accum) -> 'accum
val exists : t -> f:(node -> bool) -> bool
val for_all : t -> f:(node -> bool) -> bool
val count : t -> f:(node -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(node -> 'sum) -> 'sum
val find : t -> f:(node -> bool) -> node option
val find_map : t -> f:(node -> 'a option) -> 'a option
val to_list : t -> node list
val to_array : t -> node array
val invariants : t -> bool
val mem : t -> node -> bool
val add : t -> node -> t
val remove : t -> node -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(node, node) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> node -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(node -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of node * node
| `Left of node
| `Right of node ] -> unit) ->
unit
val filter : t -> f:(node -> bool) -> t
val partition_tf : t -> f:(node -> bool) -> t * t
val elements : t -> node list
val min_elt : t -> node option
val min_elt_exn : t -> node
val max_elt : t -> node option
val max_elt_exn : t -> node
val choose : t -> node option
val choose_exn : t -> node
val split : t -> node -> t * node option * t
val group_by :
t -> equiv:(node -> node -> bool) -> t list
val find_exn : t -> f:(node -> bool) -> node
val find_index : t -> int -> node option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t -> node Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t ->
t ->
node
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(node -> 'data) ->
(node, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
node Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
node Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : node -> t
val union_list : t list -> t
val of_list : node list -> t
val of_array : node array -> t
val of_sorted_array :
node array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : node array -> t
val stable_dedup_list : node list -> node list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> node) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> node option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(node, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) G.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b,
(key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t ->
init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri :
'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti :
'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add :
'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t ->
key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add :
'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action =
'a G.Node.Table.merge_into_action =
Remove
| Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace :
'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all :
'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar :
'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a G.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = node
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t = 'a G.Node.Hash_queue.t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> node -> bool
val lookup : 'a t -> node -> 'a option
val lookup_exn : 'a t -> node -> 'a
val enqueue :
'a t -> node -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> node -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (node * 'a) option
val keys : 'a t -> node list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (node * 'a) option
val dequeue_with_key_exn : 'a t -> node * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> node -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> node -> unit
val replace :
'a t -> node -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> node -> 'a -> unit
val iteri :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:node -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = Node.t
type graph = Node.graph
type label = G.Edge.label
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness = G.Edge.comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = edge
type comparator_witness = G.Edge.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(edge, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : edge -> 'a -> 'a t
val of_alist :
(edge * 'a) list ->
[ `Duplicate_key of edge | `Ok of 'a t ]
val of_alist_or_error :
(edge * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (edge * 'a) list -> 'a t
val of_alist_multi : (edge * 'a) list -> 'a list t
val of_alist_fold :
(edge * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(edge * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(edge * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(edge * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:edge -> data:'a -> 'a t
val add_multi :
'a list t -> key:edge -> data:'a -> 'a list t
val remove_multi : 'a list t -> edge -> 'a list t
val change :
'a t -> edge -> f:('a option -> 'a option) -> 'a t
val update :
'a t -> edge -> f:('a option -> 'a) -> 'a t
val find : 'a t -> edge -> 'a option
val find_exn : 'a t -> edge -> 'a
val remove : 'a t -> edge -> 'a t
val mem : 'a t -> edge -> bool
val iter :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(edge -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:edge ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:edge -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:edge ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(edge -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:edge -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:edge ->
data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partitioni_tf :
'a t ->
f:(key:edge -> data:'a -> bool) -> 'a t * 'a t
val partition_tf :
'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> edge list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (edge * 'a) list
val validate :
name:(edge -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:edge ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(edge, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (edge * 'a) option
val min_elt_exn : 'a t -> edge * 'a
val max_elt : 'a t -> (edge * 'a) option
val max_elt_exn : 'a t -> edge * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:edge -> data:'a -> bool) -> int
val split :
'a t -> edge -> 'a t * (edge * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:edge ->
max:edge ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:edge -> max:edge -> (edge * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> edge -> (edge * 'a) option
val nth : 'a t -> int -> (edge * 'a) option
val rank : 'a t -> edge -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:edge ->
?keys_less_or_equal_to:edge ->
'a t -> (edge * 'a) Core_kernel.Sequence.t
val obs :
edge Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
edge Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(edge, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : edge -> 'a -> 'a t
val of_alist :
(edge * 'a) list ->
[ `Duplicate_key of edge | `Ok of 'a t ]
val of_alist_or_error :
(edge * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (edge * 'a) list -> 'a t
val of_alist_multi : (edge * 'a) list -> 'a list t
val of_alist_fold :
(edge * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(edge * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(edge * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (edge * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:edge -> data:'a -> 'a t
val add_multi :
'a list t -> key:edge -> data:'a -> 'a list t
val remove_multi : 'a list t -> edge -> 'a list t
val change :
'a t -> edge -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> edge -> f:('a option -> 'a) -> 'a t
val find : 'a t -> edge -> 'a option
val find_exn : 'a t -> edge -> 'a
val remove : 'a t -> edge -> 'a t
val mem : 'a t -> edge -> bool
val iter :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(edge -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:edge -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(edge -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:edge -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:edge -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> edge list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (edge * 'a) list
val validate :
name:(edge -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:edge ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(edge, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (edge * 'a) option
val min_elt_exn : 'a t -> edge * 'a
val max_elt : 'a t -> (edge * 'a) option
val max_elt_exn : 'a t -> edge * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:edge -> data:'a -> bool) -> int
val split :
'a t -> edge -> 'a t * (edge * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:edge ->
max:edge ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:edge -> max:edge -> (edge * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> edge -> (edge * 'a) option
val nth : 'a t -> int -> (edge * 'a) option
val rank : 'a t -> edge -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:edge ->
?keys_less_or_equal_to:edge ->
'a t -> (edge * 'a) Core_kernel.Sequence.t
val obs :
edge Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
edge Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = edge
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(edge, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(edge -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> edge -> 'accum) -> 'accum
val exists : t -> f:(edge -> bool) -> bool
val for_all : t -> f:(edge -> bool) -> bool
val count : t -> f:(edge -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(edge -> 'sum) -> 'sum
val find : t -> f:(edge -> bool) -> edge option
val find_map :
t -> f:(edge -> 'a option) -> 'a option
val to_list : t -> edge list
val to_array : t -> edge array
val invariants : t -> bool
val mem : t -> edge -> bool
val add : t -> edge -> t
val remove : t -> edge -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(edge, edge) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> edge -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(edge -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of edge * edge
| `Left of edge
| `Right of edge ] -> unit) ->
unit
val filter : t -> f:(edge -> bool) -> t
val partition_tf : t -> f:(edge -> bool) -> t * t
val elements : t -> edge list
val min_elt : t -> edge option
val min_elt_exn : t -> edge
val max_elt : t -> edge option
val max_elt_exn : t -> edge
val choose : t -> edge option
val choose_exn : t -> edge
val split : t -> edge -> t * edge option * t
val group_by :
t -> equiv:(edge -> edge -> bool) -> t list
val find_exn : t -> f:(edge -> bool) -> edge
val find_index : t -> int -> edge option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t -> edge Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t ->
t ->
edge
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(edge -> 'data) ->
(edge, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
edge Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
edge Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : edge -> t
val union_list : t list -> t
val of_list : edge list -> t
val of_array : edge array -> t
val of_sorted_array :
edge array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : edge array -> t
val stable_dedup_list : edge list -> edge list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> edge) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> edge option) -> t
val of_tree : t -> t
val of_map_keys :
(edge, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t =
(edge, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(edge -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> edge -> 'accum) -> 'accum
val exists : t -> f:(edge -> bool) -> bool
val for_all : t -> f:(edge -> bool) -> bool
val count : t -> f:(edge -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(edge -> 'sum) -> 'sum
val find : t -> f:(edge -> bool) -> edge option
val find_map : t -> f:(edge -> 'a option) -> 'a option
val to_list : t -> edge list
val to_array : t -> edge array
val invariants : t -> bool
val mem : t -> edge -> bool
val add : t -> edge -> t
val remove : t -> edge -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(edge, edge) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> edge -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(edge -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of edge * edge
| `Left of edge
| `Right of edge ] -> unit) ->
unit
val filter : t -> f:(edge -> bool) -> t
val partition_tf : t -> f:(edge -> bool) -> t * t
val elements : t -> edge list
val min_elt : t -> edge option
val min_elt_exn : t -> edge
val max_elt : t -> edge option
val max_elt_exn : t -> edge
val choose : t -> edge option
val choose_exn : t -> edge
val split : t -> edge -> t * edge option * t
val group_by :
t -> equiv:(edge -> edge -> bool) -> t list
val find_exn : t -> f:(edge -> bool) -> edge
val find_index : t -> int -> edge option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t -> edge Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t ->
t ->
edge
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(edge -> 'data) ->
(edge, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
edge Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
edge Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : edge -> t
val union_list : t list -> t
val of_list : edge list -> t
val of_array : edge array -> t
val of_sorted_array :
edge array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : edge array -> t
val stable_dedup_list : edge list -> edge list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> edge) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> edge option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(edge, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Node.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b,
(key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t ->
init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri :
'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti :
'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add :
'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t ->
key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add :
'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action =
'a G.Edge.Table.merge_into_action =
Remove
| Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace :
'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all :
'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar :
'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Node.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = edge
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t = 'a G.Edge.Hash_queue.t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> edge -> bool
val lookup : 'a t -> edge -> 'a option
val lookup_exn : 'a t -> edge -> 'a
val enqueue :
'a t -> edge -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> edge -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (edge * 'a) option
val keys : 'a t -> edge list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (edge * 'a) option
val dequeue_with_key_exn : 'a t -> edge * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> edge -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> edge -> unit
val replace :
'a t -> edge -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> edge -> 'a -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:edge -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node Regular.Std.seq
val edges : t -> edge Regular.Std.seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = Edge.graph
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split :
'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(Key.t, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split :
'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = Edge.graph
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(Elt.t, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t = (Elt.t, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Edge.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list -> [ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b, (key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t -> init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti : 'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add : 'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t -> key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri : 'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add : 'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace : 'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all : 'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar : 'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Edge.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = Hash_set.elt
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : Core_kernel.Std.out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Mapper :
functor
(G : Graph) (N : sig
type s = G.node
type t
val forward : s -> t
val backward : t -> s
end) (E : sig
type s = G.edge
type t
val forward : s -> t
val backward : t -> s
end) (NL : sig
type s = G.Node.label
type t
val forward : s -> t
val backward : t -> s
end) (EL : sig
type s =
G.Edge.label
type t
val forward :
s -> t
val backward :
t -> s
end) ->
sig
type t = G.t
type node = N.t
type edge = E.t
module Node :
sig
type t = node
type graph = G.t
type label = NL.t
type edge = E.t
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t Regular.Std.seq
val preds : t -> graph -> t Regular.Std.seq
val inputs : t -> graph -> edge Regular.Std.seq
val outputs : t -> graph -> edge Regular.Std.seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = node
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(node, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : node -> 'a -> 'a t
val of_alist :
(node * 'a) list ->
[ `Duplicate_key of node | `Ok of 'a t ]
val of_alist_or_error :
(node * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (node * 'a) list -> 'a t
val of_alist_multi : (node * 'a) list -> 'a list t
val of_alist_fold :
(node * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(node * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(node * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(node * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:node -> data:'a -> 'a t
val add_multi :
'a list t -> key:node -> data:'a -> 'a list t
val remove_multi : 'a list t -> node -> 'a list t
val change :
'a t -> node -> f:('a option -> 'a option) -> 'a t
val update :
'a t -> node -> f:('a option -> 'a) -> 'a t
val find : 'a t -> node -> 'a option
val find_exn : 'a t -> node -> 'a
val remove : 'a t -> node -> 'a t
val mem : 'a t -> node -> bool
val iter :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(node -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:node ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:node -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:node ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(node -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:node -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:node ->
data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partitioni_tf :
'a t ->
f:(key:node -> data:'a -> bool) -> 'a t * 'a t
val partition_tf :
'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> node list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (node * 'a) list
val validate :
name:(node -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:node ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(node, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (node * 'a) option
val min_elt_exn : 'a t -> node * 'a
val max_elt : 'a t -> (node * 'a) option
val max_elt_exn : 'a t -> node * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:node -> data:'a -> bool) -> int
val split :
'a t -> node -> 'a t * (node * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:node ->
max:node ->
init:'b ->
f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:node -> max:node -> (node * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> node -> (node * 'a) option
val nth : 'a t -> int -> (node * 'a) option
val rank : 'a t -> node -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:node ->
?keys_less_or_equal_to:node ->
'a t -> (node * 'a) Core_kernel.Sequence.t
val obs :
node Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
node Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(node, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : node -> 'a -> 'a t
val of_alist :
(node * 'a) list ->
[ `Duplicate_key of node | `Ok of 'a t ]
val of_alist_or_error :
(node * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (node * 'a) list -> 'a t
val of_alist_multi : (node * 'a) list -> 'a list t
val of_alist_fold :
(node * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(node * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(node * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (node * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:node -> data:'a -> 'a t
val add_multi :
'a list t -> key:node -> data:'a -> 'a list t
val remove_multi : 'a list t -> node -> 'a list t
val change :
'a t -> node -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> node -> f:('a option -> 'a) -> 'a t
val find : 'a t -> node -> 'a option
val find_exn : 'a t -> node -> 'a
val remove : 'a t -> node -> 'a t
val mem : 'a t -> node -> bool
val iter :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(node -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:node ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:node -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:node ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(node -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:node -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:node -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> node list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (node * 'a) list
val validate :
name:(node -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:node ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(node, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (node * 'a) option
val min_elt_exn : 'a t -> node * 'a
val max_elt : 'a t -> (node * 'a) option
val max_elt_exn : 'a t -> node * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:node -> data:'a -> bool) -> int
val split :
'a t -> node -> 'a t * (node * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:node ->
max:node ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:node -> max:node -> (node * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> node -> (node * 'a) option
val nth : 'a t -> int -> (node * 'a) option
val rank : 'a t -> node -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:node ->
?keys_less_or_equal_to:node ->
'a t -> (node * 'a) Core_kernel.Sequence.t
val obs :
node Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
node Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = node
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(node, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(node -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> node -> 'accum) -> 'accum
val exists : t -> f:(node -> bool) -> bool
val for_all : t -> f:(node -> bool) -> bool
val count : t -> f:(node -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(node -> 'sum) -> 'sum
val find : t -> f:(node -> bool) -> node option
val find_map :
t -> f:(node -> 'a option) -> 'a option
val to_list : t -> node list
val to_array : t -> node array
val invariants : t -> bool
val mem : t -> node -> bool
val add : t -> node -> t
val remove : t -> node -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(node, node) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> node -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(node -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of node * node
| `Left of node
| `Right of node ] -> unit) ->
unit
val filter : t -> f:(node -> bool) -> t
val partition_tf : t -> f:(node -> bool) -> t * t
val elements : t -> node list
val min_elt : t -> node option
val min_elt_exn : t -> node
val max_elt : t -> node option
val max_elt_exn : t -> node
val choose : t -> node option
val choose_exn : t -> node
val split : t -> node -> t * node option * t
val group_by :
t -> equiv:(node -> node -> bool) -> t list
val find_exn : t -> f:(node -> bool) -> node
val find_index : t -> int -> node option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t -> node Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t ->
t ->
node
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(node -> 'data) ->
(node, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
node Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
node Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : node -> t
val union_list : t list -> t
val of_list : node list -> t
val of_array : node array -> t
val of_sorted_array :
node array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : node array -> t
val stable_dedup_list : node list -> node list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> node) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> node option) -> t
val of_tree : t -> t
val of_map_keys :
(node, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t =
(node, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(node -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> node -> 'accum) -> 'accum
val exists : t -> f:(node -> bool) -> bool
val for_all : t -> f:(node -> bool) -> bool
val count : t -> f:(node -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(node -> 'sum) -> 'sum
val find : t -> f:(node -> bool) -> node option
val find_map : t -> f:(node -> 'a option) -> 'a option
val to_list : t -> node list
val to_array : t -> node array
val invariants : t -> bool
val mem : t -> node -> bool
val add : t -> node -> t
val remove : t -> node -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(node, node) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> node -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(node -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of node * node
| `Left of node
| `Right of node ] -> unit) ->
unit
val filter : t -> f:(node -> bool) -> t
val partition_tf : t -> f:(node -> bool) -> t * t
val elements : t -> node list
val min_elt : t -> node option
val min_elt_exn : t -> node
val max_elt : t -> node option
val max_elt_exn : t -> node
val choose : t -> node option
val choose_exn : t -> node
val split : t -> node -> t * node option * t
val group_by :
t -> equiv:(node -> node -> bool) -> t list
val find_exn : t -> f:(node -> bool) -> node
val find_index : t -> int -> node option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t -> node Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t ->
t ->
node
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(node -> 'data) ->
(node, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
node Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
node Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : node -> t
val union_list : t list -> t
val of_list : node list -> t
val of_array : node array -> t
val of_sorted_array :
node array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : node array -> t
val stable_dedup_list : node list -> node list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> node) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> node option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(node, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) G.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b,
(key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t ->
init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri :
'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti :
'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add :
'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t ->
key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add :
'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace :
'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all :
'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar :
'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a G.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = node
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> node -> bool
val lookup : 'a t -> node -> 'a option
val lookup_exn : 'a t -> node -> 'a
val enqueue :
'a t -> node -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> node -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (node * 'a) option
val keys : 'a t -> node list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (node * 'a) option
val dequeue_with_key_exn : 'a t -> node * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> node -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> node -> unit
val replace :
'a t -> node -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> node -> 'a -> unit
val iteri :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:node -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = Node.t
type graph = Node.graph
type label = EL.t
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = edge
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(edge, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : edge -> 'a -> 'a t
val of_alist :
(edge * 'a) list ->
[ `Duplicate_key of edge | `Ok of 'a t ]
val of_alist_or_error :
(edge * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (edge * 'a) list -> 'a t
val of_alist_multi : (edge * 'a) list -> 'a list t
val of_alist_fold :
(edge * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(edge * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(edge * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(edge * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:edge -> data:'a -> 'a t
val add_multi :
'a list t -> key:edge -> data:'a -> 'a list t
val remove_multi : 'a list t -> edge -> 'a list t
val change :
'a t -> edge -> f:('a option -> 'a option) -> 'a t
val update :
'a t -> edge -> f:('a option -> 'a) -> 'a t
val find : 'a t -> edge -> 'a option
val find_exn : 'a t -> edge -> 'a
val remove : 'a t -> edge -> 'a t
val mem : 'a t -> edge -> bool
val iter :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(edge -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:edge ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:edge -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:edge ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(edge -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:edge -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:edge ->
data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partitioni_tf :
'a t ->
f:(key:edge -> data:'a -> bool) -> 'a t * 'a t
val partition_tf :
'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> edge list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (edge * 'a) list
val validate :
name:(edge -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:edge ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(edge, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (edge * 'a) option
val min_elt_exn : 'a t -> edge * 'a
val max_elt : 'a t -> (edge * 'a) option
val max_elt_exn : 'a t -> edge * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:edge -> data:'a -> bool) -> int
val split :
'a t -> edge -> 'a t * (edge * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:edge ->
max:edge ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:edge -> max:edge -> (edge * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> edge -> (edge * 'a) option
val nth : 'a t -> int -> (edge * 'a) option
val rank : 'a t -> edge -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:edge ->
?keys_less_or_equal_to:edge ->
'a t -> (edge * 'a) Core_kernel.Sequence.t
val obs :
edge Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
edge Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(edge, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : edge -> 'a -> 'a t
val of_alist :
(edge * 'a) list ->
[ `Duplicate_key of edge | `Ok of 'a t ]
val of_alist_or_error :
(edge * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (edge * 'a) list -> 'a t
val of_alist_multi : (edge * 'a) list -> 'a list t
val of_alist_fold :
(edge * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(edge * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(edge * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (edge * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:edge -> data:'a -> 'a t
val add_multi :
'a list t -> key:edge -> data:'a -> 'a list t
val remove_multi : 'a list t -> edge -> 'a list t
val change :
'a t -> edge -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> edge -> f:('a option -> 'a) -> 'a t
val find : 'a t -> edge -> 'a option
val find_exn : 'a t -> edge -> 'a
val remove : 'a t -> edge -> 'a t
val mem : 'a t -> edge -> bool
val iter :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(edge -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:edge -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(edge -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:edge -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:edge -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> edge list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (edge * 'a) list
val validate :
name:(edge -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:edge ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(edge, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (edge * 'a) option
val min_elt_exn : 'a t -> edge * 'a
val max_elt : 'a t -> (edge * 'a) option
val max_elt_exn : 'a t -> edge * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:edge -> data:'a -> bool) -> int
val split :
'a t -> edge -> 'a t * (edge * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:edge ->
max:edge ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:edge -> max:edge -> (edge * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> edge -> (edge * 'a) option
val nth : 'a t -> int -> (edge * 'a) option
val rank : 'a t -> edge -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:edge ->
?keys_less_or_equal_to:edge ->
'a t -> (edge * 'a) Core_kernel.Sequence.t
val obs :
edge Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
edge Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = edge
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(edge, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(edge -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> edge -> 'accum) -> 'accum
val exists : t -> f:(edge -> bool) -> bool
val for_all : t -> f:(edge -> bool) -> bool
val count : t -> f:(edge -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(edge -> 'sum) -> 'sum
val find : t -> f:(edge -> bool) -> edge option
val find_map :
t -> f:(edge -> 'a option) -> 'a option
val to_list : t -> edge list
val to_array : t -> edge array
val invariants : t -> bool
val mem : t -> edge -> bool
val add : t -> edge -> t
val remove : t -> edge -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(edge, edge) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> edge -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(edge -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of edge * edge
| `Left of edge
| `Right of edge ] -> unit) ->
unit
val filter : t -> f:(edge -> bool) -> t
val partition_tf : t -> f:(edge -> bool) -> t * t
val elements : t -> edge list
val min_elt : t -> edge option
val min_elt_exn : t -> edge
val max_elt : t -> edge option
val max_elt_exn : t -> edge
val choose : t -> edge option
val choose_exn : t -> edge
val split : t -> edge -> t * edge option * t
val group_by :
t -> equiv:(edge -> edge -> bool) -> t list
val find_exn : t -> f:(edge -> bool) -> edge
val find_index : t -> int -> edge option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t -> edge Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t ->
t ->
edge
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(edge -> 'data) ->
(edge, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
edge Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
edge Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : edge -> t
val union_list : t list -> t
val of_list : edge list -> t
val of_array : edge array -> t
val of_sorted_array :
edge array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : edge array -> t
val stable_dedup_list : edge list -> edge list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> edge) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> edge option) -> t
val of_tree : t -> t
val of_map_keys :
(edge, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t =
(edge, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(edge -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> edge -> 'accum) -> 'accum
val exists : t -> f:(edge -> bool) -> bool
val for_all : t -> f:(edge -> bool) -> bool
val count : t -> f:(edge -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(edge -> 'sum) -> 'sum
val find : t -> f:(edge -> bool) -> edge option
val find_map : t -> f:(edge -> 'a option) -> 'a option
val to_list : t -> edge list
val to_array : t -> edge array
val invariants : t -> bool
val mem : t -> edge -> bool
val add : t -> edge -> t
val remove : t -> edge -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(edge, edge) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> edge -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(edge -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of edge * edge
| `Left of edge
| `Right of edge ] -> unit) ->
unit
val filter : t -> f:(edge -> bool) -> t
val partition_tf : t -> f:(edge -> bool) -> t * t
val elements : t -> edge list
val min_elt : t -> edge option
val min_elt_exn : t -> edge
val max_elt : t -> edge option
val max_elt_exn : t -> edge
val choose : t -> edge option
val choose_exn : t -> edge
val split : t -> edge -> t * edge option * t
val group_by :
t -> equiv:(edge -> edge -> bool) -> t list
val find_exn : t -> f:(edge -> bool) -> edge
val find_index : t -> int -> edge option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t -> edge Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t ->
t ->
edge
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(edge -> 'data) ->
(edge, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
edge Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
edge Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : edge -> t
val union_list : t list -> t
val of_list : edge list -> t
val of_array : edge array -> t
val of_sorted_array :
edge array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : edge array -> t
val stable_dedup_list : edge list -> edge list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> edge) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> edge option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(edge, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Node.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b,
(key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t ->
init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri :
'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti :
'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add :
'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t ->
key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add :
'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace :
'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all :
'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar :
'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Node.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = edge
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> edge -> bool
val lookup : 'a t -> edge -> 'a option
val lookup_exn : 'a t -> edge -> 'a
val enqueue :
'a t -> edge -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> edge -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (edge * 'a) option
val keys : 'a t -> edge list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (edge * 'a) option
val dequeue_with_key_exn : 'a t -> edge * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> edge -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> edge -> unit
val replace :
'a t -> edge -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> edge -> 'a -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:edge -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node Regular.Std.seq
val edges : t -> edge Regular.Std.seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = Edge.graph
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split :
'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(Key.t, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split :
'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = Edge.graph
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(Elt.t, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t = (Elt.t, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Edge.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list -> [ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b, (key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t -> init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti : 'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add : 'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t -> key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri : 'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add : 'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace : 'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all : 'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar : 'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Edge.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = Hash_set.elt
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : Core_kernel.Std.out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Make :
functor (Node : Regular.Std.Opaque) (Edge : Core_kernel.Std.T) ->
sig
type t
type node = Node.t
type edge
module Node :
sig
type t = node
type graph = t
type label = t
type edge = edge
val create : label -> label
val label : label -> label
val mem : label -> graph -> bool
val succs : label -> graph -> label Regular.Std.seq
val preds : label -> graph -> label Regular.Std.seq
val inputs : label -> graph -> edge Regular.Std.seq
val outputs : label -> graph -> edge Regular.Std.seq
val degree : ?dir:[ `In | `Out ] -> label -> graph -> int
val insert : label -> graph -> graph
val update : label -> label -> graph -> graph
val remove : label -> graph -> graph
val has_edge : label -> label -> graph -> bool
val edge : label -> label -> graph -> edge option
val ( >= ) : label -> label -> bool
val ( <= ) : label -> label -> bool
val ( = ) : label -> label -> bool
val ( > ) : label -> label -> bool
val ( < ) : label -> label -> bool
val ( <> ) : label -> label -> bool
val equal : label -> label -> bool
val min : label -> label -> label
val max : label -> label -> label
val ascending : label -> label -> int
val descending : label -> label -> int
val between : label -> low:label -> high:label -> bool
val clamp_exn : label -> min:label -> max:label -> label
val clamp :
label ->
min:label -> max:label -> label Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : label -> label -> bool
val ( <= ) : label -> label -> bool
val ( = ) : label -> label -> bool
val ( > ) : label -> label -> bool
val ( < ) : label -> label -> bool
val ( <> ) : label -> label -> bool
val equal : label -> label -> bool
val compare : label -> label -> int
val min : label -> label -> label
val max : label -> label -> label
end
type comparator_witness
val comparator :
(label, comparator_witness)
Core_kernel.Comparator.comparator
val validate_lbound :
min:label Core_kernel.Maybe_bound.t ->
label Core_kernel.Validate.check
val validate_ubound :
max:label Core_kernel.Maybe_bound.t ->
label Core_kernel.Validate.check
val validate_bound :
min:label Core_kernel.Maybe_bound.t ->
max:label Core_kernel.Maybe_bound.t ->
label Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = label
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(label, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : label -> 'a -> 'a t
val of_alist :
(label * 'a) list ->
[ `Duplicate_key of label | `Ok of 'a t ]
val of_alist_or_error :
(label * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (label * 'a) list -> 'a t
val of_alist_multi : (label * 'a) list -> 'a list t
val of_alist_fold :
(label * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(label * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(label * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(label * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
label Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:label -> data:'a -> 'a t
val add_multi :
'a list t -> key:label -> data:'a -> 'a list t
val remove_multi : 'a list t -> label -> 'a list t
val change :
'a t -> label -> f:('a option -> 'a option) -> 'a t
val update :
'a t -> label -> f:('a option -> 'a) -> 'a t
val find : 'a t -> label -> 'a option
val find_exn : 'a t -> label -> 'a
val remove : 'a t -> label -> 'a t
val mem : 'a t -> label -> bool
val iter :
'a t -> f:(key:label -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:label -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(label -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:label ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:label -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:label -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:label -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:label ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:label -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:label -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(label -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:label -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:label ->
data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partitioni_tf :
'a t ->
f:(key:label -> data:'a -> bool) -> 'a t * 'a t
val partition_tf :
'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> label list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (label * 'a) list
val validate :
name:(label -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:label ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(label, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (label * 'a) option
val min_elt_exn : 'a t -> label * 'a
val max_elt : 'a t -> (label * 'a) option
val max_elt_exn : 'a t -> label * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:label -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:label -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:label -> data:'a -> bool) -> int
val split :
'a t -> label -> 'a t * (label * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:label ->
max:label ->
init:'b ->
f:(key:label -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:label -> max:label -> (label * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> label -> (label * 'a) option
val nth : 'a t -> int -> (label * 'a) option
val rank : 'a t -> label -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:label ->
?keys_less_or_equal_to:label ->
'a t -> (label * 'a) Core_kernel.Sequence.t
val obs :
label Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
label Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(label, 'a, comparator_witness)
Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : label -> 'a -> 'a t
val of_alist :
(label * 'a) list ->
[ `Duplicate_key of label | `Ok of 'a t ]
val of_alist_or_error :
(label * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (label * 'a) list -> 'a t
val of_alist_multi : (label * 'a) list -> 'a list t
val of_alist_fold :
(label * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(label * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(label * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(label * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
label Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:label -> data:'a -> 'a t
val add_multi :
'a list t -> key:label -> data:'a -> 'a list t
val remove_multi : 'a list t -> label -> 'a list t
val change :
'a t -> label -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> label -> f:('a option -> 'a) -> 'a t
val find : 'a t -> label -> 'a option
val find_exn : 'a t -> label -> 'a
val remove : 'a t -> label -> 'a t
val mem : 'a t -> label -> bool
val iter :
'a t -> f:(key:label -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:label -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(label -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:label ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:label -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:label -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:label -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:label ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:label -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:label -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(label -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:label -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:label -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:label -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> label list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (label * 'a) list
val validate :
name:(label -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:label ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(label, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (label * 'a) option
val min_elt_exn : 'a t -> label * 'a
val max_elt : 'a t -> (label * 'a) option
val max_elt_exn : 'a t -> label * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:label -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:label -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:label -> data:'a -> bool) -> int
val split :
'a t -> label -> 'a t * (label * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:label ->
max:label ->
init:'b -> f:(key:label -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:label -> max:label -> (label * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> label -> (label * 'a) option
val nth : 'a t -> int -> (label * 'a) option
val rank : 'a t -> label -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:label ->
?keys_less_or_equal_to:label ->
'a t -> (label * 'a) Core_kernel.Sequence.t
val obs :
label Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
label Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = label
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(label, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(label -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> label -> 'accum) -> 'accum
val exists : t -> f:(label -> bool) -> bool
val for_all : t -> f:(label -> bool) -> bool
val count : t -> f:(label -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(label -> 'sum) -> 'sum
val find : t -> f:(label -> bool) -> label option
val find_map :
t -> f:(label -> 'a option) -> 'a option
val to_list : t -> label list
val to_array : t -> label array
val invariants : t -> bool
val mem : t -> label -> bool
val add : t -> label -> t
val remove : t -> label -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(label, label) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> label -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(label -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of label * label
| `Left of label
| `Right of label ] -> unit) ->
unit
val filter : t -> f:(label -> bool) -> t
val partition_tf : t -> f:(label -> bool) -> t * t
val elements : t -> label list
val min_elt : t -> label option
val min_elt_exn : t -> label
val max_elt : t -> label option
val max_elt_exn : t -> label
val choose : t -> label option
val choose_exn : t -> label
val split : t -> label -> t * label option * t
val group_by :
t -> equiv:(label -> label -> bool) -> t list
val find_exn : t -> f:(label -> bool) -> label
val find_index : t -> int -> label option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:label ->
?less_or_equal_to:label ->
t -> label Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:label ->
?less_or_equal_to:label ->
t ->
t ->
label
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(label -> 'data) ->
(label, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
label Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
label Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : label -> t
val union_list : t list -> t
val of_list : label list -> t
val of_array : label array -> t
val of_sorted_array :
label array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : label array -> t
val stable_dedup_list : label list -> label list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> label) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> label option) -> t
val of_tree : t -> t
val of_map_keys :
(label, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
label Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t =
(label, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(label -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> label -> 'accum) -> 'accum
val exists : t -> f:(label -> bool) -> bool
val for_all : t -> f:(label -> bool) -> bool
val count : t -> f:(label -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(label -> 'sum) -> 'sum
val find : t -> f:(label -> bool) -> label option
val find_map : t -> f:(label -> 'a option) -> 'a option
val to_list : t -> label list
val to_array : t -> label array
val invariants : t -> bool
val mem : t -> label -> bool
val add : t -> label -> t
val remove : t -> label -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(label, label) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> label -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(label -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of label * label
| `Left of label
| `Right of label ] -> unit) ->
unit
val filter : t -> f:(label -> bool) -> t
val partition_tf : t -> f:(label -> bool) -> t * t
val elements : t -> label list
val min_elt : t -> label option
val min_elt_exn : t -> label
val max_elt : t -> label option
val max_elt_exn : t -> label
val choose : t -> label option
val choose_exn : t -> label
val split : t -> label -> t * label option * t
val group_by :
t -> equiv:(label -> label -> bool) -> t list
val find_exn : t -> f:(label -> bool) -> label
val find_index : t -> int -> label option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:label ->
?less_or_equal_to:label ->
t -> label Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:label ->
?less_or_equal_to:label ->
t ->
t ->
label
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(label -> 'data) ->
(label, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
label Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
label Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : label -> t
val union_list : t list -> t
val of_list : label list -> t
val of_array : label array -> t
val of_sorted_array :
label array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : label array -> t
val stable_dedup_list : label list -> label list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> label) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> label option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(label, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
label Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : label -> int
val compare : label -> label -> int
val hashable : label Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = label
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b,
(key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t ->
init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri :
'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti :
'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add :
'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t ->
key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add :
'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace :
'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all :
'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar :
'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = label
type 'a hash_set = 'a Equiv.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = label
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> label -> bool
val lookup : 'a t -> label -> 'a option
val lookup_exn : 'a t -> label -> 'a
val enqueue :
'a t -> label -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> label -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (label * 'a) option
val keys : 'a t -> label list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (label * 'a) option
val dequeue_with_key_exn : 'a t -> label * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> label -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> label -> unit
val replace :
'a t -> label -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> label -> 'a -> unit
val iteri :
'a t -> f:(key:label -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:label -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = Node.t
type graph = Node.graph
type label = Edge.t
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = edge
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(edge, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : edge -> 'a -> 'a t
val of_alist :
(edge * 'a) list ->
[ `Duplicate_key of edge | `Ok of 'a t ]
val of_alist_or_error :
(edge * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (edge * 'a) list -> 'a t
val of_alist_multi : (edge * 'a) list -> 'a list t
val of_alist_fold :
(edge * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(edge * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(edge * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(edge * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:edge -> data:'a -> 'a t
val add_multi :
'a list t -> key:edge -> data:'a -> 'a list t
val remove_multi : 'a list t -> edge -> 'a list t
val change :
'a t -> edge -> f:('a option -> 'a option) -> 'a t
val update :
'a t -> edge -> f:('a option -> 'a) -> 'a t
val find : 'a t -> edge -> 'a option
val find_exn : 'a t -> edge -> 'a
val remove : 'a t -> edge -> 'a t
val mem : 'a t -> edge -> bool
val iter :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(edge -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:edge ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:edge -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:edge ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(edge -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:edge -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:edge ->
data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partitioni_tf :
'a t ->
f:(key:edge -> data:'a -> bool) -> 'a t * 'a t
val partition_tf :
'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> edge list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (edge * 'a) list
val validate :
name:(edge -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:edge ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(edge, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (edge * 'a) option
val min_elt_exn : 'a t -> edge * 'a
val max_elt : 'a t -> (edge * 'a) option
val max_elt_exn : 'a t -> edge * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:edge -> data:'a -> bool) -> int
val split :
'a t -> edge -> 'a t * (edge * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:edge ->
max:edge ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:edge -> max:edge -> (edge * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> edge -> (edge * 'a) option
val nth : 'a t -> int -> (edge * 'a) option
val rank : 'a t -> edge -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:edge ->
?keys_less_or_equal_to:edge ->
'a t -> (edge * 'a) Core_kernel.Sequence.t
val obs :
edge Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
edge Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(edge, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : edge -> 'a -> 'a t
val of_alist :
(edge * 'a) list ->
[ `Duplicate_key of edge | `Ok of 'a t ]
val of_alist_or_error :
(edge * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (edge * 'a) list -> 'a t
val of_alist_multi : (edge * 'a) list -> 'a list t
val of_alist_fold :
(edge * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(edge * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(edge * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (edge * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:edge -> data:'a -> 'a t
val add_multi :
'a list t -> key:edge -> data:'a -> 'a list t
val remove_multi : 'a list t -> edge -> 'a list t
val change :
'a t -> edge -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> edge -> f:('a option -> 'a) -> 'a t
val find : 'a t -> edge -> 'a option
val find_exn : 'a t -> edge -> 'a
val remove : 'a t -> edge -> 'a t
val mem : 'a t -> edge -> bool
val iter :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(edge -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:edge -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(edge -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:edge -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:edge -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> edge list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (edge * 'a) list
val validate :
name:(edge -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:edge ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(edge, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (edge * 'a) option
val min_elt_exn : 'a t -> edge * 'a
val max_elt : 'a t -> (edge * 'a) option
val max_elt_exn : 'a t -> edge * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:edge -> data:'a -> bool) -> int
val split :
'a t -> edge -> 'a t * (edge * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:edge ->
max:edge ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:edge -> max:edge -> (edge * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> edge -> (edge * 'a) option
val nth : 'a t -> int -> (edge * 'a) option
val rank : 'a t -> edge -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:edge ->
?keys_less_or_equal_to:edge ->
'a t -> (edge * 'a) Core_kernel.Sequence.t
val obs :
edge Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
edge Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = edge
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(edge, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(edge -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> edge -> 'accum) -> 'accum
val exists : t -> f:(edge -> bool) -> bool
val for_all : t -> f:(edge -> bool) -> bool
val count : t -> f:(edge -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(edge -> 'sum) -> 'sum
val find : t -> f:(edge -> bool) -> edge option
val find_map :
t -> f:(edge -> 'a option) -> 'a option
val to_list : t -> edge list
val to_array : t -> edge array
val invariants : t -> bool
val mem : t -> edge -> bool
val add : t -> edge -> t
val remove : t -> edge -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(edge, edge) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> edge -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(edge -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of edge * edge
| `Left of edge
| `Right of edge ] -> unit) ->
unit
val filter : t -> f:(edge -> bool) -> t
val partition_tf : t -> f:(edge -> bool) -> t * t
val elements : t -> edge list
val min_elt : t -> edge option
val min_elt_exn : t -> edge
val max_elt : t -> edge option
val max_elt_exn : t -> edge
val choose : t -> edge option
val choose_exn : t -> edge
val split : t -> edge -> t * edge option * t
val group_by :
t -> equiv:(edge -> edge -> bool) -> t list
val find_exn : t -> f:(edge -> bool) -> edge
val find_index : t -> int -> edge option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t -> edge Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t ->
t ->
edge
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(edge -> 'data) ->
(edge, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
edge Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
edge Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : edge -> t
val union_list : t list -> t
val of_list : edge list -> t
val of_array : edge array -> t
val of_sorted_array :
edge array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : edge array -> t
val stable_dedup_list : edge list -> edge list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> edge) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> edge option) -> t
val of_tree : t -> t
val of_map_keys :
(edge, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t =
(edge, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(edge -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> edge -> 'accum) -> 'accum
val exists : t -> f:(edge -> bool) -> bool
val for_all : t -> f:(edge -> bool) -> bool
val count : t -> f:(edge -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(edge -> 'sum) -> 'sum
val find : t -> f:(edge -> bool) -> edge option
val find_map : t -> f:(edge -> 'a option) -> 'a option
val to_list : t -> edge list
val to_array : t -> edge array
val invariants : t -> bool
val mem : t -> edge -> bool
val add : t -> edge -> t
val remove : t -> edge -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(edge, edge) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> edge -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(edge -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of edge * edge
| `Left of edge
| `Right of edge ] -> unit) ->
unit
val filter : t -> f:(edge -> bool) -> t
val partition_tf : t -> f:(edge -> bool) -> t * t
val elements : t -> edge list
val min_elt : t -> edge option
val min_elt_exn : t -> edge
val max_elt : t -> edge option
val max_elt_exn : t -> edge
val choose : t -> edge option
val choose_exn : t -> edge
val split : t -> edge -> t * edge option * t
val group_by :
t -> equiv:(edge -> edge -> bool) -> t list
val find_exn : t -> f:(edge -> bool) -> edge
val find_index : t -> int -> edge option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t -> edge Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t ->
t ->
edge
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(edge -> 'data) ->
(edge, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
edge Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
edge Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : edge -> t
val union_list : t list -> t
val of_list : edge list -> t
val of_array : edge array -> t
val of_sorted_array :
edge array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : edge array -> t
val stable_dedup_list : edge list -> edge list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> edge) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> edge option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(edge, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Node.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b,
(key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t ->
init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri :
'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti :
'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add :
'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t ->
key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add :
'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace :
'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all :
'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar :
'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Node.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = edge
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> edge -> bool
val lookup : 'a t -> edge -> 'a option
val lookup_exn : 'a t -> edge -> 'a
val enqueue :
'a t -> edge -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> edge -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (edge * 'a) option
val keys : 'a t -> edge list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (edge * 'a) option
val dequeue_with_key_exn : 'a t -> edge * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> edge -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> edge -> unit
val replace :
'a t -> edge -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> edge -> 'a -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:edge -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node Regular.Std.seq
val edges : t -> edge Regular.Std.seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = Edge.graph
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split :
'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(Key.t, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split :
'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = Edge.graph
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(Elt.t, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t = (Elt.t, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Edge.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list -> [ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b, (key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t -> init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti : 'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add : 'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t -> key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri : 'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add : 'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace : 'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all : 'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar : 'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Edge.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = Hash_set.elt
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : Core_kernel.Std.out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
module Labeled :
functor
(Node : Regular.Std.Opaque) (NL : Core_kernel.Std.T) (EL : Core_kernel.Std.T) ->
sig
type t
type node = (Node.t, NL.t) labeled
type edge
module Node :
sig
type t = node
type graph = t
type label = (Node.t, NL.t) labeled
type edge = edge
val create : label -> t
val label : t -> label
val mem : t -> graph -> bool
val succs : t -> graph -> t Regular.Std.seq
val preds : t -> graph -> t Regular.Std.seq
val inputs : t -> graph -> edge Regular.Std.seq
val outputs : t -> graph -> edge Regular.Std.seq
val degree : ?dir:[ `In | `Out ] -> t -> graph -> int
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val has_edge : t -> t -> graph -> bool
val edge : t -> t -> graph -> edge option
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = node
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(node, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : node -> 'a -> 'a t
val of_alist :
(node * 'a) list ->
[ `Duplicate_key of node | `Ok of 'a t ]
val of_alist_or_error :
(node * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (node * 'a) list -> 'a t
val of_alist_multi : (node * 'a) list -> 'a list t
val of_alist_fold :
(node * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(node * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(node * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(node * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:node -> data:'a -> 'a t
val add_multi :
'a list t -> key:node -> data:'a -> 'a list t
val remove_multi : 'a list t -> node -> 'a list t
val change :
'a t -> node -> f:('a option -> 'a option) -> 'a t
val update :
'a t -> node -> f:('a option -> 'a) -> 'a t
val find : 'a t -> node -> 'a option
val find_exn : 'a t -> node -> 'a
val remove : 'a t -> node -> 'a t
val mem : 'a t -> node -> bool
val iter :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(node -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:node ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:node -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:node ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(node -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:node -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:node ->
data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partitioni_tf :
'a t ->
f:(key:node -> data:'a -> bool) -> 'a t * 'a t
val partition_tf :
'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> node list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (node * 'a) list
val validate :
name:(node -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:node ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(node, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (node * 'a) option
val min_elt_exn : 'a t -> node * 'a
val max_elt : 'a t -> (node * 'a) option
val max_elt_exn : 'a t -> node * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:node -> data:'a -> bool) -> int
val split :
'a t -> node -> 'a t * (node * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:node ->
max:node ->
init:'b ->
f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:node -> max:node -> (node * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> node -> (node * 'a) option
val nth : 'a t -> int -> (node * 'a) option
val rank : 'a t -> node -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:node ->
?keys_less_or_equal_to:node ->
'a t -> (node * 'a) Core_kernel.Sequence.t
val obs :
node Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
node Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(node, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : node -> 'a -> 'a t
val of_alist :
(node * 'a) list ->
[ `Duplicate_key of node | `Ok of 'a t ]
val of_alist_or_error :
(node * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (node * 'a) list -> 'a t
val of_alist_multi : (node * 'a) list -> 'a list t
val of_alist_fold :
(node * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(node * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(node * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (node * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:node -> data:'a -> 'a t
val add_multi :
'a list t -> key:node -> data:'a -> 'a list t
val remove_multi : 'a list t -> node -> 'a list t
val change :
'a t -> node -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> node -> f:('a option -> 'a) -> 'a t
val find : 'a t -> node -> 'a option
val find_exn : 'a t -> node -> 'a
val remove : 'a t -> node -> 'a t
val mem : 'a t -> node -> bool
val iter :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(node -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:node ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:node -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:node ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(node -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:node -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:node -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:node -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> node list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (node * 'a) list
val validate :
name:(node -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:node ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(node, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (node * 'a) option
val min_elt_exn : 'a t -> node * 'a
val max_elt : 'a t -> (node * 'a) option
val max_elt_exn : 'a t -> node * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:node -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:node -> data:'a -> bool) -> int
val split :
'a t -> node -> 'a t * (node * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:node ->
max:node ->
init:'b -> f:(key:node -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:node -> max:node -> (node * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> node -> (node * 'a) option
val nth : 'a t -> int -> (node * 'a) option
val rank : 'a t -> node -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:node ->
?keys_less_or_equal_to:node ->
'a t -> (node * 'a) Core_kernel.Sequence.t
val obs :
node Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
node Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = node
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(node, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(node -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> node -> 'accum) -> 'accum
val exists : t -> f:(node -> bool) -> bool
val for_all : t -> f:(node -> bool) -> bool
val count : t -> f:(node -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(node -> 'sum) -> 'sum
val find : t -> f:(node -> bool) -> node option
val find_map :
t -> f:(node -> 'a option) -> 'a option
val to_list : t -> node list
val to_array : t -> node array
val invariants : t -> bool
val mem : t -> node -> bool
val add : t -> node -> t
val remove : t -> node -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(node, node) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> node -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(node -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of node * node
| `Left of node
| `Right of node ] -> unit) ->
unit
val filter : t -> f:(node -> bool) -> t
val partition_tf : t -> f:(node -> bool) -> t * t
val elements : t -> node list
val min_elt : t -> node option
val min_elt_exn : t -> node
val max_elt : t -> node option
val max_elt_exn : t -> node
val choose : t -> node option
val choose_exn : t -> node
val split : t -> node -> t * node option * t
val group_by :
t -> equiv:(node -> node -> bool) -> t list
val find_exn : t -> f:(node -> bool) -> node
val find_index : t -> int -> node option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t -> node Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t ->
t ->
node
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(node -> 'data) ->
(node, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
node Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
node Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : node -> t
val union_list : t list -> t
val of_list : node list -> t
val of_array : node array -> t
val of_sorted_array :
node array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : node array -> t
val stable_dedup_list : node list -> node list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> node) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> node option) -> t
val of_tree : t -> t
val of_map_keys :
(node, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t =
(node, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(node -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> node -> 'accum) -> 'accum
val exists : t -> f:(node -> bool) -> bool
val for_all : t -> f:(node -> bool) -> bool
val count : t -> f:(node -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(node -> 'sum) -> 'sum
val find : t -> f:(node -> bool) -> node option
val find_map : t -> f:(node -> 'a option) -> 'a option
val to_list : t -> node list
val to_array : t -> node array
val invariants : t -> bool
val mem : t -> node -> bool
val add : t -> node -> t
val remove : t -> node -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(node, node) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> node -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(node -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of node * node
| `Left of node
| `Right of node ] -> unit) ->
unit
val filter : t -> f:(node -> bool) -> t
val partition_tf : t -> f:(node -> bool) -> t * t
val elements : t -> node list
val min_elt : t -> node option
val min_elt_exn : t -> node
val max_elt : t -> node option
val max_elt_exn : t -> node
val choose : t -> node option
val choose_exn : t -> node
val split : t -> node -> t * node option * t
val group_by :
t -> equiv:(node -> node -> bool) -> t list
val find_exn : t -> f:(node -> bool) -> node
val find_index : t -> int -> node option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t -> node Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:node ->
?less_or_equal_to:node ->
t ->
t ->
node
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(node -> 'data) ->
(node, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
node Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
node Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : node -> t
val union_list : t list -> t
val of_list : node list -> t
val of_array : node array -> t
val of_sorted_array :
node array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : node array -> t
val stable_dedup_list : node list -> node list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> node) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> node option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(node, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
node Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl =
('a, 'b) Core_kernel.Hashable.Hashtbl.t
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b,
(key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t ->
init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri :
'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti :
'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add :
'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t ->
key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add :
'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace :
'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all :
'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar :
'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Equiv.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = node
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> node -> bool
val lookup : 'a t -> node -> 'a option
val lookup_exn : 'a t -> node -> 'a
val enqueue :
'a t -> node -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> node -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (node * 'a) option
val keys : 'a t -> node list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (node * 'a) option
val dequeue_with_key_exn : 'a t -> node * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> node -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> node -> unit
val replace :
'a t -> node -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> node -> 'a -> unit
val iteri :
'a t -> f:(key:node -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:node -> data:'a -> 'b) -> 'b
end
end
module Edge :
sig
type t = edge
type node = Node.t
type graph = Node.graph
type label = EL.t
val create : node -> node -> label -> t
val label : t -> label
val src : t -> node
val dst : t -> node
val mem : t -> graph -> bool
val insert : t -> graph -> graph
val update : t -> label -> graph -> graph
val remove : t -> graph -> graph
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t ->
t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = edge
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(edge, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : edge -> 'a -> 'a t
val of_alist :
(edge * 'a) list ->
[ `Duplicate_key of edge | `Ok of 'a t ]
val of_alist_or_error :
(edge * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (edge * 'a) list -> 'a t
val of_alist_multi : (edge * 'a) list -> 'a list t
val of_alist_fold :
(edge * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(edge * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(edge * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(edge * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:edge -> data:'a -> 'a t
val add_multi :
'a list t -> key:edge -> data:'a -> 'a list t
val remove_multi : 'a list t -> edge -> 'a list t
val change :
'a t -> edge -> f:('a option -> 'a option) -> 'a t
val update :
'a t -> edge -> f:('a option -> 'a) -> 'a t
val find : 'a t -> edge -> 'a option
val find_exn : 'a t -> edge -> 'a
val remove : 'a t -> edge -> 'a t
val mem : 'a t -> edge -> bool
val iter :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(edge -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:edge ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi :
'a t -> f:(key:edge -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:edge ->
data:[ `Both of 'a * 'b
| `Left of 'a
| `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(edge -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t ->
f:(key:edge -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:edge ->
data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partitioni_tf :
'a t ->
f:(key:edge -> data:'a -> bool) -> 'a t * 'a t
val partition_tf :
'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal :
('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> edge list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (edge * 'a) list
val validate :
name:(edge -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:edge ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(edge, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (edge * 'a) option
val min_elt_exn : 'a t -> edge * 'a
val max_elt : 'a t -> (edge * 'a) option
val max_elt_exn : 'a t -> edge * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:edge -> data:'a -> bool) -> int
val split :
'a t -> edge -> 'a t * (edge * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:edge ->
max:edge ->
init:'b ->
f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:edge -> max:edge -> (edge * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> edge -> (edge * 'a) option
val nth : 'a t -> int -> (edge * 'a) option
val rank : 'a t -> edge -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:edge ->
?keys_less_or_equal_to:edge ->
'a t -> (edge * 'a) Core_kernel.Sequence.t
val obs :
edge Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
edge Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(edge, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : edge -> 'a -> 'a t
val of_alist :
(edge * 'a) list ->
[ `Duplicate_key of edge | `Ok of 'a t ]
val of_alist_or_error :
(edge * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (edge * 'a) list -> 'a t
val of_alist_multi : (edge * 'a) list -> 'a list t
val of_alist_fold :
(edge * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(edge * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(edge * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (edge * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:edge -> data:'a -> 'a t
val add_multi :
'a list t -> key:edge -> data:'a -> 'a list t
val remove_multi : 'a list t -> edge -> 'a list t
val change :
'a t -> edge -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> edge -> f:('a option -> 'a) -> 'a t
val find : 'a t -> edge -> 'a option
val find_exn : 'a t -> edge -> 'a
val remove : 'a t -> edge -> 'a t
val mem : 'a t -> edge -> bool
val iter :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(edge -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:edge -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:edge ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(edge -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:edge -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:edge -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:edge -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> edge list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (edge * 'a) list
val validate :
name:(edge -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:edge ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(edge, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (edge * 'a) option
val min_elt_exn : 'a t -> edge * 'a
val max_elt : 'a t -> (edge * 'a) option
val max_elt_exn : 'a t -> edge * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:edge -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:edge -> data:'a -> bool) -> int
val split :
'a t -> edge -> 'a t * (edge * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:edge ->
max:edge ->
init:'b -> f:(key:edge -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:edge -> max:edge -> (edge * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> edge -> (edge * 'a) option
val nth : 'a t -> int -> (edge * 'a) option
val rank : 'a t -> edge -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:edge ->
?keys_less_or_equal_to:edge ->
'a t -> (edge * 'a) Core_kernel.Sequence.t
val obs :
edge Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
edge Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = edge
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(edge, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(edge -> unit) -> unit
val fold :
t ->
init:'accum ->
f:('accum -> edge -> 'accum) -> 'accum
val exists : t -> f:(edge -> bool) -> bool
val for_all : t -> f:(edge -> bool) -> bool
val count : t -> f:(edge -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(edge -> 'sum) -> 'sum
val find : t -> f:(edge -> bool) -> edge option
val find_map :
t -> f:(edge -> 'a option) -> 'a option
val to_list : t -> edge list
val to_array : t -> edge array
val invariants : t -> bool
val mem : t -> edge -> bool
val add : t -> edge -> t
val remove : t -> edge -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(edge, edge) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> edge -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(edge -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of edge * edge
| `Left of edge
| `Right of edge ] -> unit) ->
unit
val filter : t -> f:(edge -> bool) -> t
val partition_tf : t -> f:(edge -> bool) -> t * t
val elements : t -> edge list
val min_elt : t -> edge option
val min_elt_exn : t -> edge
val max_elt : t -> edge option
val max_elt_exn : t -> edge
val choose : t -> edge option
val choose_exn : t -> edge
val split : t -> edge -> t * edge option * t
val group_by :
t -> equiv:(edge -> edge -> bool) -> t list
val find_exn : t -> f:(edge -> bool) -> edge
val find_index : t -> int -> edge option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t -> edge Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t ->
t ->
edge
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(edge -> 'data) ->
(edge, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
edge Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
edge Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : edge -> t
val union_list : t list -> t
val of_list : edge list -> t
val of_array : edge array -> t
val of_sorted_array :
edge array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : edge array -> t
val stable_dedup_list : edge list -> edge list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> edge) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> edge option) -> t
val of_tree : t -> t
val of_map_keys :
(edge, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t =
(edge, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(edge -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> edge -> 'accum) -> 'accum
val exists : t -> f:(edge -> bool) -> bool
val for_all : t -> f:(edge -> bool) -> bool
val count : t -> f:(edge -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(edge -> 'sum) -> 'sum
val find : t -> f:(edge -> bool) -> edge option
val find_map : t -> f:(edge -> 'a option) -> 'a option
val to_list : t -> edge list
val to_array : t -> edge array
val invariants : t -> bool
val mem : t -> edge -> bool
val add : t -> edge -> t
val remove : t -> edge -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(edge, edge) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> edge -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(edge -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of edge * edge
| `Left of edge
| `Right of edge ] -> unit) ->
unit
val filter : t -> f:(edge -> bool) -> t
val partition_tf : t -> f:(edge -> bool) -> t * t
val elements : t -> edge list
val min_elt : t -> edge option
val min_elt_exn : t -> edge
val max_elt : t -> edge option
val max_elt_exn : t -> edge
val choose : t -> edge option
val choose_exn : t -> edge
val split : t -> edge -> t * edge option * t
val group_by :
t -> equiv:(edge -> edge -> bool) -> t list
val find_exn : t -> f:(edge -> bool) -> edge
val find_index : t -> int -> edge option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t -> edge Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:edge ->
?less_or_equal_to:edge ->
t ->
t ->
edge
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(edge -> 'data) ->
(edge, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
edge Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
edge Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : edge -> t
val union_list : t list -> t
val of_list : edge list -> t
val of_array : edge array -> t
val of_sorted_array :
edge array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : edge array -> t
val stable_dedup_list : edge list -> edge list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> edge) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> edge option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(edge, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
edge Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Node.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable :
key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b,
(key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list ->
[ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t ->
init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri :
'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli :
'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti :
'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add :
'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t ->
key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c,
'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add :
'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace :
'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all :
'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar :
'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Node.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = edge
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t ->
init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> edge -> bool
val lookup : 'a t -> edge -> 'a option
val lookup_exn : 'a t -> edge -> 'a
val enqueue :
'a t -> edge -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> edge -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (edge * 'a) option
val keys : 'a t -> edge list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (edge * 'a) option
val dequeue_with_key_exn : 'a t -> edge * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> edge -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> edge -> unit
val replace :
'a t -> edge -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> edge -> 'a -> unit
val iteri :
'a t -> f:(key:edge -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:edge -> data:'a -> 'b) -> 'b
end
end
val empty : t
val nodes : t -> node Regular.Std.seq
val edges : t -> edge Regular.Std.seq
val is_directed : bool
val number_of_edges : t -> int
val number_of_nodes : t -> int
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Core_kernel.Or_error.t
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
end
type comparator_witness
val comparator :
(t, comparator_witness) Core_kernel.Comparator.comparator
val validate_lbound :
min:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_ubound :
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
val validate_bound :
min:t Core_kernel.Maybe_bound.t ->
max:t Core_kernel.Maybe_bound.t -> t Core_kernel.Validate.check
module Map :
sig
module Key :
sig
type t = Edge.graph
type comparator_witness = comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type 'a t =
(Key.t, 'a, comparator_witness)
Core_kernel.Core_map.Tree.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list ->
init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked :
(Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri :
'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct :
('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti :
'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split :
'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
type 'a t =
(Key.t, 'a, comparator_witness) Core_kernel.Core_map.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list ->
[ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error :
(Key.t * 'a) list -> 'a t Core_kernel.Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array :
(Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val gen :
Key.t Core_kernel.Quickcheck.Generator.t ->
'a Core_kernel.Quickcheck.Generator.t ->
'a t Core_kernel.Quickcheck.Generator.t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi :
'a list t -> key:Key.t -> data:'a -> 'a list t
val remove_multi : 'a list t -> Key.t -> 'a list t
val change :
'a t -> Key.t -> f:('a option -> 'a option) -> 'a t
val update : 'a t -> Key.t -> f:('a option -> 'a) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter_keys : 'a t -> f:(Key.t -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold2 :
'a t ->
'b t ->
init:'c ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c -> 'c) ->
'c
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filteri :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_keys : 'a t -> f:(Key.t -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val partition_mapi :
'a t ->
f:(key:Key.t -> data:'a -> [ `Fst of 'b | `Snd of 'c ]) ->
'b t * 'c t
val partition_map :
'a t ->
f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
val partitioni_tf :
'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t * 'a t
val partition_tf : 'a t -> f:('a -> bool) -> 'a t * 'a t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist :
?key_order:[ `Decreasing | `Increasing ] ->
'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Core_kernel.Validate.check ->
'a t Core_kernel.Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t, 'a)
Core_kernel.Core_map_intf.Symmetric_diff_element.t
Core_kernel.Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val for_alli :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val existsi :
'a t -> f:(key:Key.t -> data:'a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val counti : 'a t -> f:(key:Key.t -> data:'a -> bool) -> int
val split :
'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t ->
'a t -> (Key.t * 'a) Core_kernel.Sequence.t
val obs :
Key.t Core_kernel.Quickcheck.Observer.t ->
'v Core_kernel.Quickcheck.Observer.t ->
'v t Core_kernel.Quickcheck.Observer.t
val shrinker :
Key.t Core_kernel.Quickcheck.Shrinker.t ->
'v Core_kernel.Quickcheck.Shrinker.t ->
'v t Core_kernel.Quickcheck.Shrinker.t
end
module Set :
sig
module Elt :
sig
type t = Edge.graph
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type comparator_witness = Map.Key.comparator_witness
val comparator :
(t, comparator_witness)
Core_kernel.Comparator.comparator
end
module Tree :
sig
type t =
(Elt.t, comparator_witness)
Core_kernel.Core_set.Tree.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t ->
init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t
Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) ->
'b
val fold_right :
t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by :
t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t
Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array :
Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.Tree.t ->
f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
type t = (Elt.t, comparator_witness) Core_kernel.Core_set.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff :
t ->
t ->
(Elt.t, Elt.t) Core_kernel.Either.t Core_kernel.Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t
| `Left of Elt.t
| `Right of Elt.t ] -> unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t -> Elt.t Core_kernel.Sequence.t
val merge_to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t ->
t ->
t ->
Elt.t Core_kernel.Core_set_intf.Merge_to_sequence_element.t
Core_kernel.Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, comparator_witness)
Core_kernel.Core_set_intf.Map.t
val obs :
Elt.t Core_kernel.Quickcheck.obs ->
t Core_kernel.Quickcheck.obs
val shrinker :
Elt.t Core_kernel.Quickcheck.shr ->
t Core_kernel.Quickcheck.shr
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Core_kernel.Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map :
('a, 'b) Core_kernel.Core_set.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_kernel.Core_set.t ->
f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, comparator_witness)
Core_kernel.Core_set_intf.Map.t -> t
val gen :
Elt.t Core_kernel.Quickcheck.Generator.t ->
t Core_kernel.Quickcheck.Generator.t
end
val hash : t -> int
val compare : t -> t -> int
val hashable : t Core_kernel.Hashable.Hashtbl.Hashable.t
module Table :
sig
type key = t
type ('a, 'b) hashtbl = ('a, 'b) Edge.Table.hashtbl
type 'b t = (key, 'b) hashtbl
val t_of_sexp :
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> 'b t
val sexp_of_t :
('b -> Sexplib.Sexp.t) -> 'b t -> Sexplib.Sexp.t
type ('a, 'b) t_ = 'b t
type 'a key_ = key
val hashable : key Core_kernel.Core_hashtbl_intf.Hashable.t
val invariant :
'a Core_kernel.Invariant_intf.inv ->
'a t Core_kernel.Invariant_intf.inv
val create :
(key, 'b, unit -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist :
(key, 'b,
(key * 'b) list -> [ `Duplicate_key of key | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_report_all_dups :
(key, 'b,
(key * 'b) list ->
[ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_or_error :
(key, 'b, (key * 'b) list -> 'b t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_exn :
(key, 'b, (key * 'b) list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val of_alist_multi :
(key, 'b list, (key * 'b) list -> 'b list t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_mapped :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'b t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key :
(key, 'r,
get_key:('r -> key) ->
'r list -> [ `Duplicate_keys of key list | `Ok of 'r t ])
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_or_error :
(key, 'r,
get_key:('r -> key) ->
'r list -> 'r t Core_kernel.Or_error.t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val create_with_key_exn :
(key, 'r, get_key:('r -> key) -> 'r list -> 'r t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val group :
(key, 'b,
get_key:('r -> key) ->
get_data:('r -> 'b) ->
combine:('b -> 'b -> 'b) -> 'r list -> 'b t)
Core_kernel.Core_hashtbl_intf.create_options_without_hashable
val sexp_of_key : 'a t -> key -> Sexplib.Sexp.t
val clear : 'a t -> unit
val copy : 'b t -> 'b t
val fold :
'b t -> init:'c -> f:(key:key -> data:'b -> 'c -> 'c) -> 'c
val iter_vals : 'b t -> f:('b -> unit) -> unit
val iteri : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val iter_keys : 'a t -> f:(key -> unit) -> unit
val iter : 'b t -> f:(key:key -> data:'b -> unit) -> unit
val existsi : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val exists : 'b t -> f:('b -> bool) -> bool
val for_alli : 'b t -> f:(key:key -> data:'b -> bool) -> bool
val for_all : 'b t -> f:('b -> bool) -> bool
val counti : 'b t -> f:(key:key -> data:'b -> bool) -> int
val count : 'b t -> f:('b -> bool) -> int
val length : 'a t -> int
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val remove : 'a t -> key -> unit
val replace : 'b t -> key:key -> data:'b -> unit
val set : 'b t -> key:key -> data:'b -> unit
val add : 'b t -> key:key -> data:'b -> [ `Duplicate | `Ok ]
val add_or_error :
'b t -> key:key -> data:'b -> unit Core_kernel.Or_error.t
val add_exn : 'b t -> key:key -> data:'b -> unit
val change :
'b t -> key -> f:('b option -> 'b option) -> unit
val update : 'b t -> key -> f:('b option -> 'b) -> unit
val add_multi : 'b list t -> key:key -> data:'b -> unit
val remove_multi : 'a list t -> key -> unit
val map :
('c, 'b t -> f:('b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_map :
('c, 'b t -> f:('b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter_mapi :
('c, 'b t -> f:(key:key -> data:'b -> 'c option) -> 'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
val filter : 'b t -> f:('b -> bool) -> 'b t
val filteri : 'b t -> f:(key:key -> data:'b -> bool) -> 'b t
val partition_map :
('c,
('d,
'b t ->
f:('b -> [ `Fst of 'c | `Snd of 'd ]) -> 'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_mapi :
('c,
('d,
'b t ->
f:(key:key -> data:'b -> [ `Fst of 'c | `Snd of 'd ]) ->
'c t * 'd t)
Core_kernel.Core_hashtbl_intf.no_map_options)
Core_kernel.Core_hashtbl_intf.no_map_options
val partition_tf : 'b t -> f:('b -> bool) -> 'b t * 'b t
val partitioni_tf :
'b t -> f:(key:key -> data:'b -> bool) -> 'b t * 'b t
val find_or_add : 'b t -> key -> default:(unit -> 'b) -> 'b
val find : 'b t -> key -> 'b option
val find_exn : 'b t -> key -> 'b
val find_and_call :
'b t ->
key ->
if_found:('b -> 'c) -> if_not_found:(key -> 'c) -> 'c
val find_and_remove : 'b t -> key -> 'b option
val merge :
('c,
'a t ->
'b t ->
f:(key:key ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] ->
'c option) ->
'c t)
Core_kernel.Core_hashtbl_intf.no_map_options
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into :
src:'a t ->
dst:'b t ->
f:(key:key -> 'a -> 'b option -> 'b merge_into_action) ->
unit
val keys : 'a t -> key list
val data : 'b t -> 'b list
val filter_inplace : 'b t -> f:('b -> bool) -> unit
val filteri_inplace :
'b t -> f:(key:key -> data:'b -> bool) -> unit
val filter_keys_inplace : 'a t -> f:(key -> bool) -> unit
val map_inplace : 'b t -> f:('b -> 'b) -> unit
val mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_map_inplace : 'b t -> f:('b -> 'b option) -> unit
val filter_mapi_inplace :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val replace_all : 'b t -> f:('b -> 'b) -> unit
val replace_alli :
'b t -> f:(key:key -> data:'b -> 'b) -> unit
val filter_replace_all : 'b t -> f:('b -> 'b option) -> unit
val filter_replace_alli :
'b t -> f:(key:key -> data:'b -> 'b option) -> unit
val equal : 'b t -> 'b t -> ('b -> 'b -> bool) -> bool
val similar : 'b1 t -> 'b2 t -> ('b1 -> 'b2 -> bool) -> bool
val to_alist : 'b t -> (key * 'b) list
val validate :
name:(key -> string) ->
'b Core_kernel.Validate.check ->
'b t Core_kernel.Validate.check
val incr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
val decr :
?by:int -> ?remove_if_zero:bool -> int t -> key -> unit
end
module Hash_set :
sig
type elt = t
type 'a hash_set = 'a Edge.Hash_set.hash_set
type t = elt hash_set
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
type 'a t_ = t
type 'a elt_ = elt
val create :
('a, unit -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
val of_list :
('a, elt list -> t)
Core_kernel.Hash_set_intf.create_options_without_hashable
end
module Hash_queue :
sig
module Key :
sig
type t = Hash_set.elt
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
val hash : t -> int
end
type 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold :
'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum :
(module Core_kernel.Commutative_group.S with type t = 'sum) ->
'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val invariant : 'a t -> unit
val create :
?growth_allowed:bool -> ?size:int -> unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue :
'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val first : 'a t -> 'a option
val first_with_key : 'a t -> (Key.t * 'a) option
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
val to_string : t -> string
val str : unit -> t -> string
val pps : unit -> t -> string
val ppo : Core_kernel.Std.out_channel -> t -> unit
val pp_seq :
Format.formatter -> t Core_kernel.Std.Sequence.t -> unit
val pp : Format.formatter -> t -> unit
end
type scheme
type 'a symbolizer = 'a -> string
val create_scheme :
next:(string -> string) -> string -> Graphlib.Std.Graphlib.scheme
val symbols : Graphlib.Std.Graphlib.scheme
val numbers : Graphlib.Std.Graphlib.scheme
val nothing : Graphlib.Std.Graphlib.scheme
val by_given_order :
Graphlib.Std.Graphlib.scheme ->
('a -> 'a -> int) ->
'a Core_kernel.Std.Sequence.t -> 'a Graphlib.Std.Graphlib.symbolizer
val by_natural_order :
Graphlib.Std.Graphlib.scheme ->
('a -> 'a -> int) ->
'a Core_kernel.Std.Sequence.t -> 'a Graphlib.Std.Graphlib.symbolizer
module Dot :
sig
val pp_graph :
?name:string ->
?attrs:string list ->
?string_of_node:'n Graphlib.Std.Graphlib.symbolizer ->
?node_label:'n Graphlib.Std.Graphlib.symbolizer ->
?edge_label:'e Graphlib.Std.Graphlib.symbolizer ->
nodes_of_edge:('e -> 'n * 'n) ->
nodes:'n Core_kernel.Std.Sequence.t ->
edges:'e Core_kernel.Std.Sequence.t -> Format.formatter -> unit
end
end
end